1 | <?php |
||
19 | class SpecificationQueryHandler implements QueryHandler |
||
20 | { |
||
21 | /** |
||
22 | * @var EntityManagerInterface |
||
23 | */ |
||
24 | private $em; |
||
25 | |||
26 | /** |
||
27 | * @param EntityManagerInterface $em |
||
28 | */ |
||
29 | public function __construct(EntityManagerInterface $em) |
||
33 | |||
34 | /** |
||
35 | * @param Query $query |
||
36 | * |
||
37 | * @return mixed |
||
38 | */ |
||
39 | public function handle(Query $query) |
||
50 | } |
||
51 |
Unless you are absolutely sure that the expression can never be null because of other conditions, we strongly recommend to add an additional type check to your code: