| 1 | <?php | ||
| 16 | class SpecificationQueryHandler | ||
| 17 | { | ||
| 18 | /** | ||
| 19 | * @var EntityManagerInterface | ||
| 20 | */ | ||
| 21 | private $em; | ||
| 22 | |||
| 23 | /** | ||
| 24 | * @param EntityManagerInterface $em | ||
| 25 | */ | ||
| 26 | 1 | public function __construct(EntityManagerInterface $em) | |
| 30 | |||
| 31 | /** | ||
| 32 | * @param SpecificationQuery $query | ||
| 33 | * | ||
| 34 | * @return mixed | ||
| 35 | */ | ||
| 36 | 1 | public function handleSpecification(SpecificationQuery $query) | |
| 43 | } | ||
| 44 | 
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: