In this class, not all scenarios are tested and coverage is currently not 100%. In an attempt to solve this issue, it's noticed that this is due to code that is never executed.
The below code snippets are never executed;
if ( count( $subdomains ) == 0 ) { return $baseDomain; // --> this line (check is executed but never returns 0) }
So, this code can be safely removed? I've done end to end testing on this and yes, we can remove this code.
Acceptance Criteria
- Remove unreachable / untestable code
- Coverage should go up to 96.00%