These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | /** |
||
4 | * Interface that should be implemented by all mapping feature classes. |
||
5 | * |
||
6 | * @since 0.6.3 |
||
7 | * |
||
8 | * @licence GNU GPL v2+ |
||
9 | * @author Jeroen De Dauw < [email protected] > |
||
10 | */ |
||
11 | interface iMappingService { |
||
12 | |||
13 | /** |
||
14 | * Returns the internal name of the service. |
||
15 | * |
||
16 | * @since 0.6.5 |
||
17 | * |
||
18 | * @return string |
||
19 | */ |
||
20 | public function getName(); |
||
21 | |||
22 | /** |
||
23 | * Adds the dependencies to the parser output as head items. |
||
24 | * |
||
25 | * @since 0.6.3 |
||
26 | * |
||
27 | * @param mixed $parserOrOut |
||
28 | */ |
||
29 | public function addDependencies( &$parserOrOut ); |
||
30 | |||
31 | /** |
||
32 | * Adds service-specific parameter definitions to the provided parameter list. |
||
33 | * |
||
34 | * @since 0.7 |
||
35 | * |
||
36 | * @param array $parameterInfo |
||
37 | * |
||
38 | * @return array |
||
39 | */ |
||
40 | public function addParameterInfo( array &$parameterInfo ); |
||
41 | |||
42 | /** |
||
43 | * Adds a feature to this service. This is to indicate this service has support for this feature. |
||
44 | * |
||
45 | * @since 0.6.5 |
||
46 | * |
||
47 | * @param string $featureName |
||
48 | * @param string $handlingClass |
||
49 | */ |
||
50 | public function addFeature( $featureName, $handlingClass ); |
||
51 | |||
52 | /** |
||
53 | * Returns the name of the class that handles the provided feature in this service, or false if there is none. |
||
54 | * |
||
55 | * @since 0.6.5 |
||
56 | * |
||
57 | * @param string $featureName. |
||
0 ignored issues
–
show
|
|||
58 | * |
||
59 | * @return mixed String or false |
||
60 | */ |
||
61 | public function getFeature( $featureName ); |
||
62 | |||
63 | /** |
||
64 | * Returns an instance of the class handling the provided feature with this service, or false if there is none. |
||
65 | * |
||
66 | * @since 0.6.6 |
||
67 | * |
||
68 | * @param string $featureName. |
||
0 ignored issues
–
show
There is no parameter named
$featureName. . Did you maybe mean $featureName ?
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function. It has, however, found a similar but not annotated parameter which might be a good fit. Consider the following example. The parameter /**
* @param array $germany
* @param array $ireland
*/
function finale($germany, $island) {
return "2:1";
}
The most likely cause is that the parameter was changed, but the annotation was not.
Loading history...
|
|||
69 | * |
||
70 | * @return object or false |
||
71 | */ |
||
72 | public function getFeatureInstance( $featureName ); |
||
73 | |||
74 | /** |
||
75 | * Returns a list of aliases. |
||
76 | * |
||
77 | * @since 0.6.5 |
||
78 | * |
||
79 | * @return array |
||
80 | */ |
||
81 | public function getAliases(); |
||
82 | |||
83 | /** |
||
84 | * Returns if the service has a certain alias or not. |
||
85 | * |
||
86 | * @since 0.6.5 |
||
87 | * |
||
88 | * @param string $alias |
||
89 | * |
||
90 | * @return boolean |
||
91 | */ |
||
92 | public function hasAlias( $alias ); |
||
93 | |||
94 | /** |
||
95 | * Returns the default zoomlevel for the mapping service. |
||
96 | * |
||
97 | * @since 0.6.5 |
||
98 | * |
||
99 | * @return integer |
||
100 | */ |
||
101 | public function getDefaultZoom(); |
||
102 | |||
103 | /** |
||
104 | * Returns the zoomlevel that shows the whole earth for the mapping service. |
||
105 | * |
||
106 | * @since 1.0 |
||
107 | * |
||
108 | * @return integer |
||
109 | */ |
||
110 | public function getEarthZoom(); |
||
111 | |||
112 | /** |
||
113 | * Returns a string that can be used as an unique ID for the map html element. |
||
114 | * Increments the number by default, providing false for $increment will get |
||
115 | * you the same ID as on the last request. |
||
116 | * |
||
117 | * @since 0.6.5 |
||
118 | * |
||
119 | * @param boolean $increment |
||
120 | * |
||
121 | * @return string |
||
122 | */ |
||
123 | public function getMapId( $increment = true ); |
||
124 | |||
125 | } |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function. It has, however, found a similar but not annotated parameter which might be a good fit.
Consider the following example. The parameter
$ireland
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was changed, but the annotation was not.