@@ -128,6 +128,9 @@ discard block |
||
128 | 128 | } |
129 | 129 | } |
130 | 130 | |
131 | + /** |
|
132 | + * @param string $link |
|
133 | + */ |
|
131 | 134 | protected function setLinkFromParameter( Line &$line , $link ) { |
132 | 135 | if ( filter_var( $link , FILTER_VALIDATE_URL , FILTER_FLAG_SCHEME_REQUIRED ) ) { |
133 | 136 | $line->setLink( $link ); |
@@ -141,7 +144,7 @@ discard block |
||
141 | 144 | * Checks if a string is prefixed with link: |
142 | 145 | * @static |
143 | 146 | * @param $link |
144 | - * @return bool|string |
|
147 | + * @return string|false |
|
145 | 148 | * @since 2.0 |
146 | 149 | */ |
147 | 150 | private function isLinkParameter( $link ) { |
@@ -17,6 +17,9 @@ discard block |
||
17 | 17 | private $fileFetcher; |
18 | 18 | private $geoNamesUser; |
19 | 19 | |
20 | + /** |
|
21 | + * @param string $geoNamesUser |
|
22 | + */ |
|
20 | 23 | public function __construct( FileFetcher $fileFetcher, $geoNamesUser ) { |
21 | 24 | $this->fileFetcher = $fileFetcher; |
22 | 25 | $this->geoNamesUser = $geoNamesUser; |
@@ -57,6 +60,10 @@ discard block |
||
57 | 60 | . urlencode( $this->geoNamesUser ); |
58 | 61 | } |
59 | 62 | |
63 | + /** |
|
64 | + * @param string $xml |
|
65 | + * @param string $tagName |
|
66 | + */ |
|
60 | 67 | private function getXmlElementValue( $xml, $tagName ) { |
61 | 68 | $match = []; |
62 | 69 | preg_match( "/<$tagName>(.*?)<\/$tagName>/", $xml, $match ); |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | * @param string $geoService |
110 | 110 | * @param boolean $checkForCoords |
111 | 111 | * |
112 | - * @return LatLongValue|false |
|
112 | + * @return LatLongValue |
|
113 | 113 | */ |
114 | 114 | public static function attemptToGeocode( $coordsOrAddress, $geoService = '', $checkForCoords = true ) { |
115 | 115 | if ( $checkForCoords ) { |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | * @param string $address |
136 | 136 | * @param string $geoService |
137 | 137 | * |
138 | - * @return LatLongValue|false |
|
138 | + * @return LatLongValue |
|
139 | 139 | * @throws MWException |
140 | 140 | */ |
141 | 141 | public static function geocode( $address, $geoService = '' ) { |
@@ -266,7 +266,7 @@ discard block |
||
266 | 266 | * |
267 | 267 | * @param string $geocoderIdentifier |
268 | 268 | * |
269 | - * @return string|bool |
|
269 | + * @return string |
|
270 | 270 | * @throws MWException |
271 | 271 | */ |
272 | 272 | private static function getValidGeocoderIdentifier( $geocoderIdentifier ) { |