1 | <?php |
||
27 | class Geotools implements GeotoolsInterface |
||
28 | { |
||
29 | /** |
||
30 | * Version. |
||
31 | * @see http://semver.org/ |
||
32 | */ |
||
33 | const VERSION = '0.7.1-dev'; |
||
34 | |||
35 | /** |
||
36 | * The cardinal points / directions (the four cardinal directions, |
||
37 | * the four ordinal directions, plus eight further divisions). |
||
38 | * |
||
39 | * @var array |
||
40 | */ |
||
41 | public static $cardinalPoints = array( |
||
42 | 'N', 'NNE', 'NE', 'ENE', |
||
43 | 'E', 'ESE', 'SE', 'SSE', |
||
44 | 'S', 'SSW', 'SW', 'WSW', |
||
45 | 'W', 'WNW', 'NW', 'NNW', |
||
46 | 'N' |
||
47 | ); |
||
48 | |||
49 | /** |
||
50 | * Latitude bands in the UTM coordinate system. |
||
51 | * @see http://en.wikipedia.org/wiki/Universal_Transverse_Mercator_coordinate_system |
||
52 | * |
||
53 | * @var array |
||
54 | */ |
||
55 | public static $latitudeBands = array( |
||
56 | 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K', 'L', 'M', 'N', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'X' |
||
57 | ); |
||
58 | |||
59 | |||
60 | /** |
||
61 | * {@inheritDoc} |
||
62 | */ |
||
63 | 29 | public function distance() |
|
67 | |||
68 | /** |
||
69 | * {@inheritDoc} |
||
70 | */ |
||
71 | 15 | public function vertex() |
|
75 | |||
76 | /** |
||
77 | * {@inheritDoc} |
||
78 | */ |
||
79 | 1 | public function batch(Geocoder $geocoder) |
|
83 | |||
84 | /** |
||
85 | * {@inheritDoc} |
||
86 | */ |
||
87 | 8 | public function geohash() |
|
91 | |||
92 | /** |
||
93 | * {@inheritDoc} |
||
94 | */ |
||
95 | 13 | public function convert(CoordinateInterface $coordinates) |
|
99 | } |
||
100 |
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.