Skip to content

Commit 35b935c

Browse files
authored
Replace SMW removed class aliases (#808)
* Replace SMWPrintRequest with SMW\Query\PrintRequest I missed this spot. * Update phpstan.neon * Update phpstan.neon * Update phpstan-baseline.neon * Update MapsFactory.php * Update phpstan-baseline.neon * Update phpstan-baseline.neon
1 parent 34e7348 commit 35b935c

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

phpstan-baseline.neon

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
parameters:
22
ignoreErrors:
33
-
4-
message: "#^Call to static method getInstance\\(\\) on an unknown class SMW\\\\ApplicationFactory\\.$#"
4+
message: "#^Call to static method getInstance\\(\\) on an unknown class SMW\\\\Services\\\\ServicesFactory\\.$#"
55
count: 1
66
path: src/MapsFactory.php
77

88
-
9-
message: "#^Method Maps\\\\MapsFactory\\:\\:getSmwFactory\\(\\) has invalid return type SMW\\\\ApplicationFactory\\.$#"
9+
message: "#^Method Maps\\\\MapsFactory\\:\\:getSmwFactory\\(\\) has invalid return type SMW\\\\Services\\\\ServicesFactory\\.$#"
1010
count: 1
1111
path: src/MapsFactory.php
1212

1313
-
14-
message: "#^Access to constant PRINT_THIS on an unknown class SMWPrintRequest\\.$#"
14+
message: "#^Access to constant PRINT_THIS on an unknown class SMW\\\\Query\\\\PrintRequest\\.$#"
1515
count: 1
1616
path: src/MapsHooks.php
1717

src/MapsFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
use RepoGroup;
4242
use SimpleCache\Cache\Cache;
4343
use SimpleCache\Cache\MediaWikiCache;
44-
use SMW\ApplicationFactory;
44+
use SMW\Services\ServicesFactory as ApplicationFactory;
4545
use Title;
4646

4747
/**

src/MapsHooks.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
use MediaWiki\MediaWikiServices;
1212
use MediaWiki\Settings\SettingsBuilder;
1313
use SkinTemplate;
14-
use SMWPrintRequest;
14+
use SMW\Query\PrintRequest;
1515

1616
/**
1717
* Static class for hooks handled by the Maps extension.
@@ -128,7 +128,7 @@ public static function onChangeTagsAllowedAdd( array &$allowedTags, array $tags,
128128
* @since 1.0
129129
*
130130
* @param $format Mixed: The format (string), or false when not set yet
131-
* @param SMWPrintRequest[] $printRequests The print requests made
131+
* @param PrintRequest[] $printRequests The print requests made
132132
*
133133
* @return boolean
134134
*/
@@ -144,7 +144,7 @@ public static function addGeoCoordsDefaultFormat( &$format, array $printRequests
144144
// Loop through the print requests to determine their types.
145145
foreach ( $printRequests as $printRequest ) {
146146
// Skip the first request, as it's the object.
147-
if ( $printRequest->getMode() == SMWPrintRequest::PRINT_THIS ) {
147+
if ( $printRequest->getMode() == PrintRequest::PRINT_THIS ) {
148148
continue;
149149
}
150150

0 commit comments

Comments
 (0)