In this branch, the function will implicitly return null which is incompatible with the type-hinted return hiqdev\php\billing\action\Action. 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
// $action = new Action();
25
// $this->repo->calculate($action);
26
27
// return $action;
28
}
29
30
protected function checkRequiredInput(ActionCalculateCommand $command): void
The property customer does not exist on hiqdev\billing\hiapi\act...\ActionCalculateCommand. Since you implemented __get, consider adding a @property annotation.
The type hiqdev\billing\hiapi\sal...\RequiredInputException was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. excluded_paths:["lib/*"],
you can move it to the dependency path list as follows:
The property target does not exist on hiqdev\billing\hiapi\act...\ActionCalculateCommand. Since you implemented __get, consider adding a @property annotation.
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: