In this branch, the function will implicitly return null which is incompatible with the type-hinted return hiqdev\php\billing\customer\Customer. Consider adding a return statement or allowing null as return value.
For hinted functions/methods where all return statements with the correct type are only reachable via conditions, ?null? gets implicitly returned which may be incompatible with the hinted type.
Let?s take a look at an example:
interfaceReturnsInt{publicfunctionreturnsIntHinted():int;}classMyClassimplementsReturnsInt{publicfunctionreturnsIntHinted():int{if(foo()){return123;}// here: null is implicitly returned}}
Loading history...
24
}
25
26
protected function checkRequiredInput(Command $command)
The property customer does not exist on hiqdev\billing\hiapi\tools\CleanForTests\Command. Since you implemented __get, consider adding a @property annotation.
Loading history...
30
throw new RequiredInputException('customer or customer_id');
For hinted functions/methods where all return statements with the correct type are only reachable via conditions, ?null? gets implicitly returned which may be incompatible with the hinted type. Let?s take a look at an example: