1 | <?php |
||
20 | final class MongoDBPagerProvider implements PagerProviderInterface |
||
21 | { |
||
22 | /** |
||
23 | * @var string |
||
24 | */ |
||
25 | private $objectClass; |
||
26 | |||
27 | /** |
||
28 | * @var ManagerRegistry |
||
29 | */ |
||
30 | private $doctrine; |
||
31 | |||
32 | /** |
||
33 | * @var array |
||
34 | */ |
||
35 | private $baseOptions; |
||
36 | |||
37 | /** |
||
38 | * @var RegisterListenersService |
||
39 | */ |
||
40 | private $registerListenersService; |
||
41 | |||
42 | /** |
||
43 | * @param ManagerRegistry $doctrine |
||
44 | * @param RegisterListenersService $registerListenersService |
||
45 | * @param string $objectClass |
||
46 | * @param array $baseOptions |
||
47 | */ |
||
48 | public function __construct(ManagerRegistry $doctrine, RegisterListenersService $registerListenersService, $objectClass, array $baseOptions) |
||
55 | |||
56 | /** |
||
57 | * {@inheritdoc} |
||
58 | */ |
||
59 | public function provide(array $options = array()) |
||
74 | } |
||
75 |
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: