@@ -68,7 +68,7 @@ |
||
68 | 68 | /** |
69 | 69 | * This function returns the definitions for the parameters used by every map feature. |
70 | 70 | * |
71 | - * @return array |
|
71 | + * @return ParamProcessor\IParamDefinition[] |
|
72 | 72 | */ |
73 | 73 | public static function getCommonParameters() { |
74 | 74 | $params = []; |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | |
56 | 56 | /** |
57 | 57 | * @param string $serviceName |
58 | - * @param array $aliases |
|
58 | + * @param string[] $aliases |
|
59 | 59 | */ |
60 | 60 | public function __construct( $serviceName, array $aliases = [] ) { |
61 | 61 | $this->serviceName = $serviceName; |
@@ -72,6 +72,7 @@ discard block |
||
72 | 72 | |
73 | 73 | /** |
74 | 74 | * @since 0.6.3 |
75 | + * @param string $featureName |
|
75 | 76 | */ |
76 | 77 | public function addFeature( $featureName, $handlingClass ) { |
77 | 78 | $this->features[$featureName] = $handlingClass; |
@@ -180,6 +181,7 @@ discard block |
||
180 | 181 | |
181 | 182 | /** |
182 | 183 | * @since 0.6.3 |
184 | + * @param string $alias |
|
183 | 185 | */ |
184 | 186 | public function hasAlias( $alias ) { |
185 | 187 | return in_array( $alias, $this->aliases ); |
@@ -190,7 +192,7 @@ discard block |
||
190 | 192 | * |
191 | 193 | * @since 0.7.3 |
192 | 194 | * |
193 | - * @param mixed $modules Array of string or string |
|
195 | + * @param string[] $modules Array of string or string |
|
194 | 196 | */ |
195 | 197 | public function addResourceModules( $modules ) { |
196 | 198 | $this->resourceModules = array_merge( $this->resourceModules, (array)$modules ); |
@@ -93,7 +93,7 @@ |
||
93 | 93 | * |
94 | 94 | * @see ParserHook::getDefaultParameters |
95 | 95 | * |
96 | - * @return array |
|
96 | + * @return string[] |
|
97 | 97 | */ |
98 | 98 | protected function getDefaultParameters( $type ) { |
99 | 99 | return [ 'location', 'format', 'directional' ]; |
@@ -98,7 +98,7 @@ |
||
98 | 98 | * |
99 | 99 | * @param $type |
100 | 100 | * |
101 | - * @return array |
|
101 | + * @return string[] |
|
102 | 102 | */ |
103 | 103 | protected function getDefaultParameters( $type ) { |
104 | 104 | return [ 'distance', 'unit', 'decimals' ]; |
@@ -111,7 +111,7 @@ |
||
111 | 111 | * |
112 | 112 | * @see ParserHook::getDefaultParameters |
113 | 113 | * |
114 | - * @return array |
|
114 | + * @return string[] |
|
115 | 115 | */ |
116 | 116 | protected function getDefaultParameters( $type ) { |
117 | 117 | return [ 'location', 'bearing', 'distance' ]; |
@@ -104,7 +104,7 @@ |
||
104 | 104 | * |
105 | 105 | * @see ParserHook::getDefaultParameters |
106 | 106 | * |
107 | - * @return array |
|
107 | + * @return string[] |
|
108 | 108 | */ |
109 | 109 | protected function getDefaultParameters( $type ) { |
110 | 110 | return [ 'location' ]; |
@@ -113,7 +113,7 @@ |
||
113 | 113 | * |
114 | 114 | * @param $type |
115 | 115 | * |
116 | - * @return array |
|
116 | + * @return string[] |
|
117 | 117 | */ |
118 | 118 | protected function getDefaultParameters( $type ) { |
119 | 119 | return [ 'location1', 'location2', 'unit', 'decimals' ]; |
@@ -131,8 +131,6 @@ discard block |
||
131 | 131 | /** |
132 | 132 | * Message function that takes into account the language parameter. |
133 | 133 | * |
134 | - * @param string $key |
|
135 | - * @param ... $args |
|
136 | 134 | * |
137 | 135 | * @return string |
138 | 136 | */ |
@@ -193,7 +191,7 @@ discard block |
||
193 | 191 | * |
194 | 192 | * @see ParserHook::getDefaultParameters |
195 | 193 | * |
196 | - * @return array |
|
194 | + * @return string[] |
|
197 | 195 | */ |
198 | 196 | protected function getDefaultParameters( $type ) { |
199 | 197 | return [ 'service', 'language' ]; |
@@ -63,6 +63,7 @@ discard block |
||
63 | 63 | |
64 | 64 | /** |
65 | 65 | * @see SMWDataValue::parseUserValue |
66 | + * @param string $value |
|
66 | 67 | */ |
67 | 68 | protected function parseUserValue( $value ) { |
68 | 69 | if ( !is_string( $value ) ) { |
@@ -112,6 +113,9 @@ discard block |
||
112 | 113 | } |
113 | 114 | } |
114 | 115 | |
116 | + /** |
|
117 | + * @return string |
|
118 | + */ |
|
115 | 119 | private function parserDistance( $distance ) { |
116 | 120 | if ( $distance !== false ) { |
117 | 121 | $distance = substr( trim( $distance ), 0, -1 ); |