Conditions | 3 |
Paths | 4 |
Total Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
27 | 3 | public function getRenderableMap($width = null, $height = null) |
|
28 | { |
||
29 | 3 | $gmap = MapUtil::get_map($this->owner, $this->MarkerTemplateValues); |
|
|
|||
30 | 3 | $w = $width ? $width : MapUtil::$map_width; |
|
31 | 3 | $h = $height ? $height : MapUtil::$map_height; |
|
32 | 3 | $gmap->setSize($w, $h); |
|
33 | |||
34 | 3 | return $gmap; |
|
35 | } |
||
36 | } |
||
37 |
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: