Completed
Push — master ( e0d9db...fc532a )
by
unknown
20s
created
src/WikibaseQualityConstraintsHooks.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -20,46 +20,46 @@
 block discarded – undo
20 20
 {
21 21
 
22 22
 	/** @inheritDoc */
23
-	public function onArticlePurge( $wikiPage ) {
23
+	public function onArticlePurge($wikiPage) {
24 24
 		$entityContentFactory = WikibaseRepo::getEntityContentFactory();
25
-		if ( $entityContentFactory->isEntityContentModel( $wikiPage->getContentModel() ) ) {
25
+		if ($entityContentFactory->isEntityContentModel($wikiPage->getContentModel())) {
26 26
 			$entityIdLookup = WikibaseRepo::getEntityIdLookup();
27
-			$entityId = $entityIdLookup->getEntityIdForTitle( $wikiPage->getTitle() );
28
-			if ( $entityId !== null ) {
27
+			$entityId = $entityIdLookup->getEntityIdForTitle($wikiPage->getTitle());
28
+			if ($entityId !== null) {
29 29
 				$resultsCache = ResultsCache::getDefaultInstance();
30
-				$resultsCache->delete( $entityId );
30
+				$resultsCache->delete($entityId);
31 31
 			}
32 32
 		}
33 33
 	}
34 34
 
35 35
 	/** @inheritDoc */
36
-	public function onBeforePageDisplay( $out, $skin ): void {
36
+	public function onBeforePageDisplay($out, $skin): void {
37 37
 		$lookup = WikibaseRepo::getEntityNamespaceLookup();
38 38
 		$title = $out->getTitle();
39
-		if ( $title === null ) {
39
+		if ($title === null) {
40 40
 			return;
41 41
 		}
42 42
 
43
-		if ( !$lookup->isNamespaceWithEntities( $title->getNamespace() ) ) {
43
+		if (!$lookup->isNamespaceWithEntities($title->getNamespace())) {
44 44
 			return;
45 45
 		}
46
-		if ( empty( $out->getJsConfigVars()['wbIsEditView'] ) ) {
46
+		if (empty($out->getJsConfigVars()['wbIsEditView'])) {
47 47
 			return;
48 48
 		}
49 49
 
50 50
 		$services = MediaWikiServices::getInstance();
51 51
 		$config = $services->getMainConfig();
52 52
 
53
-		$isMobileView = ExtensionRegistry::getInstance()->isLoaded( 'MobileFrontend' ) &&
54
-			$services->getService( 'MobileFrontend.Context' )->shouldDisplayMobileView();
55
-		if ( $isMobileView ) {
53
+		$isMobileView = ExtensionRegistry::getInstance()->isLoaded('MobileFrontend') &&
54
+			$services->getService('MobileFrontend.Context')->shouldDisplayMobileView();
55
+		if ($isMobileView) {
56 56
 			return;
57 57
 		}
58 58
 
59
-		$out->addModules( 'wikibase.quality.constraints.suggestions' );
59
+		$out->addModules('wikibase.quality.constraints.suggestions');
60 60
 
61
-		if ( $out->getUser()->isAllowed( 'wbqc-check-constraints' ) ) {
62
-			$out->addModules( 'wikibase.quality.constraints.gadget' );
61
+		if ($out->getUser()->isAllowed('wbqc-check-constraints')) {
62
+			$out->addModules('wikibase.quality.constraints.gadget');
63 63
 		}
64 64
 	}
65 65
 
Please login to merge, or discard this patch.