1 | <?php |
||
23 | class SizeCollector extends AbstractCollector |
||
24 | { |
||
25 | /** |
||
26 | * @var InfoWindowCollector |
||
27 | */ |
||
28 | private $infoWindowCollector; |
||
29 | |||
30 | /** |
||
31 | * @var IconCollector |
||
32 | */ |
||
33 | private $iconCollector; |
||
34 | |||
35 | 24 | public function __construct(InfoWindowCollector $infoWindowCollector, IconCollector $iconCollector) |
|
40 | |||
41 | /** |
||
42 | * @return InfoWindowCollector |
||
43 | */ |
||
44 | 4 | public function getInfoWindowCollector() |
|
48 | |||
49 | 24 | public function setInfoWindowCollector(InfoWindowCollector $infoWindowCollector) |
|
53 | |||
54 | /** |
||
55 | * @return IconCollector |
||
56 | */ |
||
57 | 4 | public function getIconCollector() |
|
61 | |||
62 | 24 | public function setIconCollector(IconCollector $iconCollector) |
|
66 | |||
67 | /** |
||
68 | * @param Size[] $sizes |
||
69 | * |
||
70 | * @return Size[] |
||
71 | */ |
||
72 | 12 | public function collect(Map $map, array $sizes = []) |
|
92 | } |
||
93 |
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: