1 | <?php |
||
16 | class PolygonParser extends LineParser { |
||
17 | |||
18 | protected function constructShapeFromLatLongValues( array $locations ) { |
||
21 | |||
22 | protected function handleCommonParams( array &$params, Line &$line ) { |
||
26 | |||
27 | protected function handlePolygonParams( array &$params, Polygon &$polygon ) { |
||
40 | |||
41 | } |
||
42 |
This check looks for parameters that are defined as one type in their type hint or doc comment but seem to be used as a narrower type, i.e an implementation of an interface or a subclass.
Consider changing the type of the parameter or doing an instanceof check before assuming your parameter is of the expected type.