1 | <?php |
||
18 | class SpecificationQueryHandler implements QueryHandler |
||
19 | { |
||
20 | /** |
||
21 | * @var EntityManagerInterface |
||
22 | */ |
||
23 | private $em; |
||
24 | |||
25 | /** |
||
26 | * @param EntityManagerInterface $em |
||
27 | */ |
||
28 | 2 | public function __construct(EntityManagerInterface $em) |
|
32 | |||
33 | /** |
||
34 | * @param Query $query |
||
35 | * |
||
36 | * @return mixed |
||
37 | */ |
||
38 | 2 | public function handle(Query $query) |
|
49 | } |
||
50 |
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: