The method getMessage() does not exist on Psr\Container\ContainerExceptionInterface. It seems like you code against a sub-type of said class. However, the method does not exist in Psr\Container\NotFoundExceptionInterface. Are you sure you never get one of those?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
In this branch, the function will implicitly return null which is incompatible with the type-hinted return Prozorov\Repositories\Co...cts\RepositoryInterface. 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...
41
}
42
}
43
44
/**
45
* fail.
46
*
47
* @access protected
48
* @param string $className
49
* @param string $message
50
* @return void
51
*/
52
2
protected function fail(string $className, string $message = ''): void