1 | <?php |
||
18 | class Polygon extends Shape |
||
19 | { |
||
20 | /** |
||
21 | * @param ElementInterface $parent |
||
22 | * @param array $coordinatePairs |
||
23 | * |
||
24 | * @return Polygon |
||
25 | */ |
||
26 | public static function createWithPairs(ElementInterface $parent, array $coordinatePairs) |
||
30 | |||
31 | 3 | public function addPointArray(array $coordinatePairs) |
|
44 | |||
45 | 5 | public function addPoint($x, $y) |
|
55 | |||
56 | /** |
||
57 | * @param ElementInterface $parent |
||
58 | * |
||
59 | * @return Polygon |
||
60 | */ |
||
61 | public static function create(ElementInterface $parent) |
||
65 | |||
66 | /** |
||
67 | * @param ElementInterface $parent |
||
68 | * @param $x |
||
69 | * @param $y |
||
70 | * |
||
71 | * @return Polygon |
||
72 | */ |
||
73 | public static function createWithPoint(ElementInterface $parent, $x, $y) |
||
77 | |||
78 | /** |
||
79 | * @return Path | null |
||
80 | */ |
||
81 | 2 | public function toPath() |
|
94 | |||
95 | /** |
||
96 | * @return array |
||
97 | */ |
||
98 | 3 | private function pointsAsArray() |
|
111 | |||
112 | 8 | public function getName() |
|
116 | |||
117 | 1 | protected function getCenterX() |
|
121 | |||
122 | 1 | public function getBoundingBox() |
|
136 | |||
137 | 1 | protected function getCenterY() |
|
141 | } |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: