@@ -43,7 +43,7 @@ public function getQueryDescription( $value ) {
4343 throw new InvalidArgumentException ( '$value needs to be a string ' );
4444 }
4545
46- [ $ distance , $ comparator ] = $ this ->parseUserValue ( $ value );
46+ [ $ distance , $ comparator ] = $ this ->parseAndReturnUserValue ( $ value );
4747 $ distance = $ this ->parserDistance ( $ distance );
4848
4949 $ this ->setUserValue ( $ value );
@@ -69,7 +69,11 @@ public function getQueryDescription( $value ) {
6969 /**
7070 * @see SMWDataValue::parseUserValue
7171 */
72- protected function parseUserValue ( $ value ) {
72+ protected function parseUserValue ( $ value ): void {
73+ $ this ->parseAndReturnUserValue ( $ value );
74+ }
75+
76+ private function parseAndReturnUserValue ( $ value ): array {
7377 if ( !is_string ( $ value ) ) {
7478 throw new InvalidArgumentException ( '$value needs to be a string ' );
7579 }
@@ -245,16 +249,14 @@ protected function loadDataItem( SMWDataItem $dataItem ) {
245249 * $2: The location in directional DMS notation.
246250 * $3: The latitude in non-directional float notation.
247251 * $4 The longitude in non-directional float notation.
248- *
249- * @return array
250252 */
251- protected function getServiceLinkParams () {
253+ protected function getServiceLinkParams (): array {
252254 $ coordinateSet = $ this ->m_dataitem ->getCoordinateSet ();
253255 return [
254256 $ this ->getFormattedCoord ( $ this ->m_dataitem , 'float ' ), // TODO
255257 $ this ->getFormattedCoord ( $ this ->m_dataitem , 'dms ' ), // TODO
256258 $ coordinateSet ['lat ' ],
257- $ coordinateSet ['lon ' ]
259+ $ coordinateSet ['lon ' ],
258260 ];
259261 }
260262
0 commit comments