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 | /** |
||
36 | * @param InfoWindowCollector $infoWindowCollector |
||
37 | * @param IconCollector $iconCollector |
||
38 | */ |
||
39 | 240 | public function __construct(InfoWindowCollector $infoWindowCollector, IconCollector $iconCollector) |
|
44 | |||
45 | /** |
||
46 | * @return InfoWindowCollector |
||
47 | */ |
||
48 | 4 | public function getInfoWindowCollector() |
|
52 | |||
53 | /** |
||
54 | * @param InfoWindowCollector $infoWindowCollector |
||
55 | */ |
||
56 | 240 | public function setInfoWindowCollector(InfoWindowCollector $infoWindowCollector) |
|
60 | |||
61 | /** |
||
62 | * @return IconCollector |
||
63 | */ |
||
64 | 4 | public function getIconCollector() |
|
68 | |||
69 | /** |
||
70 | * @param IconCollector $iconCollector |
||
71 | */ |
||
72 | 240 | public function setIconCollector(IconCollector $iconCollector) |
|
76 | |||
77 | /** |
||
78 | * @param Map $map |
||
79 | * @param Size[] $sizes |
||
80 | * |
||
81 | * @return Size[] |
||
82 | */ |
||
83 | 228 | public function collect(Map $map, array $sizes = []) |
|
103 | } |
||
104 |
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: