Completed
Push — master ( b9ee6e...b01fda )
by
unknown
02:01 queued 10s
created
src/WikibaseQualityConstraintsHooks.php 1 patch
Spacing   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -28,27 +28,27 @@  discard block
 block discarded – undo
28 28
 	/**
29 29
 	 * @param DatabaseUpdater $updater
30 30
 	 */
31
-	public static function onCreateSchema( DatabaseUpdater $updater ) {
32
-		$dir = dirname( __DIR__ ) . '/sql/';
31
+	public static function onCreateSchema(DatabaseUpdater $updater) {
32
+		$dir = dirname(__DIR__).'/sql/';
33 33
 
34 34
 		$updater->addExtensionTable(
35 35
 			'wbqc_constraints',
36
-			$dir . "/{$updater->getDB()->getType()}/tables-generated.sql"
36
+			$dir."/{$updater->getDB()->getType()}/tables-generated.sql"
37 37
 		);
38 38
 		$updater->addExtensionField(
39 39
 			'wbqc_constraints',
40 40
 			'constraint_id',
41
-			$dir . '/patch-wbqc_constraints-constraint_id.sql'
41
+			$dir.'/patch-wbqc_constraints-constraint_id.sql'
42 42
 		);
43 43
 		$updater->addExtensionIndex(
44 44
 			'wbqc_constraints',
45 45
 			'wbqc_constraints_guid_uniq',
46
-			$dir . '/patch-wbqc_constraints-wbqc_constraints_guid_uniq.sql'
46
+			$dir.'/patch-wbqc_constraints-wbqc_constraints_guid_uniq.sql'
47 47
 		);
48 48
 	}
49 49
 
50
-	public static function onWikibaseChange( Change $change ) {
51
-		if ( !( $change instanceof EntityChange ) ) {
50
+	public static function onWikibaseChange(Change $change) {
51
+		if (!($change instanceof EntityChange)) {
52 52
 			return;
53 53
 		}
54 54
 
@@ -57,48 +57,48 @@  discard block
 block discarded – undo
57 57
 
58 58
 		// If jobs are enabled and the results would be stored in some way run a job.
59 59
 		if (
60
-			$config->get( 'WBQualityConstraintsEnableConstraintsCheckJobs' ) &&
61
-			$config->get( 'WBQualityConstraintsCacheCheckConstraintsResults' ) &&
60
+			$config->get('WBQualityConstraintsEnableConstraintsCheckJobs') &&
61
+			$config->get('WBQualityConstraintsCacheCheckConstraintsResults') &&
62 62
 			self::isSelectedForJobRunBasedOnPercentage()
63 63
 		) {
64
-			$params = [ 'entityId' => $change->getEntityId()->getSerialization() ];
64
+			$params = ['entityId' => $change->getEntityId()->getSerialization()];
65 65
 			JobQueueGroup::singleton()->lazyPush(
66
-				new JobSpecification( CheckConstraintsJob::COMMAND, $params )
66
+				new JobSpecification(CheckConstraintsJob::COMMAND, $params)
67 67
 			);
68 68
 		}
69 69
 
70
-		if ( $config->get( 'WBQualityConstraintsEnableConstraintsImportFromStatements' ) &&
71
-			self::isConstraintStatementsChange( $config, $change )
70
+		if ($config->get('WBQualityConstraintsEnableConstraintsImportFromStatements') &&
71
+			self::isConstraintStatementsChange($config, $change)
72 72
 		) {
73
-			$params = [ 'propertyId' => $change->getEntityId()->getSerialization() ];
73
+			$params = ['propertyId' => $change->getEntityId()->getSerialization()];
74 74
 			$metadata = $change->getMetadata();
75
-			if ( array_key_exists( 'rev_id', $metadata ) ) {
75
+			if (array_key_exists('rev_id', $metadata)) {
76 76
 				$params['revisionId'] = $metadata['rev_id'];
77 77
 			}
78 78
 			JobQueueGroup::singleton()->push(
79
-				new JobSpecification( 'constraintsTableUpdate', $params )
79
+				new JobSpecification('constraintsTableUpdate', $params)
80 80
 			);
81 81
 		}
82 82
 	}
83 83
 
84 84
 	private static function isSelectedForJobRunBasedOnPercentage() {
85 85
 		$config = MediaWikiServices::getInstance()->getMainConfig();
86
-		$percentage = $config->get( 'WBQualityConstraintsEnableConstraintsCheckJobsRatio' );
86
+		$percentage = $config->get('WBQualityConstraintsEnableConstraintsCheckJobsRatio');
87 87
 
88
-		return mt_rand( 1, 100 ) <= $percentage;
88
+		return mt_rand(1, 100) <= $percentage;
89 89
 	}
90 90
 
91
-	public static function isConstraintStatementsChange( Config $config, Change $change ) {
92
-		if ( !( $change instanceof EntityChange ) ||
91
+	public static function isConstraintStatementsChange(Config $config, Change $change) {
92
+		if (!($change instanceof EntityChange) ||
93 93
 			 $change->getAction() !== EntityChange::UPDATE ||
94
-			 !( $change->getEntityId() instanceof PropertyId )
94
+			 !($change->getEntityId() instanceof PropertyId)
95 95
 		) {
96 96
 			return false;
97 97
 		}
98 98
 
99 99
 		$info = $change->getInfo();
100 100
 
101
-		if ( !array_key_exists( 'compactDiff', $info ) ) {
101
+		if (!array_key_exists('compactDiff', $info)) {
102 102
 			// the non-compact diff ($info['diff']) does not contain statement diffs (T110996),
103 103
 			// so we only know that the change *might* affect the constraint statements
104 104
 			return true;
@@ -107,47 +107,47 @@  discard block
 block discarded – undo
107 107
 		/** @var EntityDiffChangedAspects $aspects */
108 108
 		$aspects = $info['compactDiff'];
109 109
 
110
-		$propertyConstraintId = $config->get( 'WBQualityConstraintsPropertyConstraintId' );
111
-		return in_array( $propertyConstraintId, $aspects->getStatementChanges() );
110
+		$propertyConstraintId = $config->get('WBQualityConstraintsPropertyConstraintId');
111
+		return in_array($propertyConstraintId, $aspects->getStatementChanges());
112 112
 	}
113 113
 
114
-	public static function onArticlePurge( WikiPage $wikiPage ) {
114
+	public static function onArticlePurge(WikiPage $wikiPage) {
115 115
 		$repo = WikibaseRepo::getDefaultInstance();
116 116
 
117 117
 		$entityContentFactory = $repo->getEntityContentFactory();
118
-		if ( $entityContentFactory->isEntityContentModel( $wikiPage->getContentModel() ) ) {
118
+		if ($entityContentFactory->isEntityContentModel($wikiPage->getContentModel())) {
119 119
 			$entityIdLookup = $repo->getEntityIdLookup();
120
-			$entityId = $entityIdLookup->getEntityIdForTitle( $wikiPage->getTitle() );
121
-			if ( $entityId !== null ) {
120
+			$entityId = $entityIdLookup->getEntityIdForTitle($wikiPage->getTitle());
121
+			if ($entityId !== null) {
122 122
 				$resultsCache = ResultsCache::getDefaultInstance();
123
-				$resultsCache->delete( $entityId );
123
+				$resultsCache->delete($entityId);
124 124
 			}
125 125
 		}
126 126
 	}
127 127
 
128
-	public static function onBeforePageDisplay( OutputPage $out, Skin $skin ) {
128
+	public static function onBeforePageDisplay(OutputPage $out, Skin $skin) {
129 129
 		$repo = WikibaseRepo::getDefaultInstance();
130 130
 
131 131
 		$lookup = $repo->getEntityNamespaceLookup();
132 132
 		$title = $out->getTitle();
133
-		if ( $title === null ) {
133
+		if ($title === null) {
134 134
 			return;
135 135
 		}
136 136
 
137
-		if ( !$lookup->isNamespaceWithEntities( $title->getNamespace() ) ) {
137
+		if (!$lookup->isNamespaceWithEntities($title->getNamespace())) {
138 138
 			return;
139 139
 		}
140
-		if ( empty( $out->getJsConfigVars()['wbIsEditView'] ) ) {
140
+		if (empty($out->getJsConfigVars()['wbIsEditView'])) {
141 141
 			return;
142 142
 		}
143 143
 
144
-		$out->addModules( 'wikibase.quality.constraints.suggestions' );
144
+		$out->addModules('wikibase.quality.constraints.suggestions');
145 145
 
146
-		if ( !$out->getUser()->isRegistered() ) {
146
+		if (!$out->getUser()->isRegistered()) {
147 147
 			return;
148 148
 		}
149 149
 
150
-		$out->addModules( 'wikibase.quality.constraints.gadget' );
150
+		$out->addModules('wikibase.quality.constraints.gadget');
151 151
 	}
152 152
 
153 153
 }
Please login to merge, or discard this patch.
maintenance/ImportConstraintStatements.php 1 patch
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -11,10 +11,10 @@  discard block
 block discarded – undo
11 11
 use Wikimedia\Rdbms\ILBFactory;
12 12
 
13 13
 // @codeCoverageIgnoreStart
14
-$basePath = getenv( "MW_INSTALL_PATH" ) !== false
15
-	? getenv( "MW_INSTALL_PATH" ) : __DIR__ . "/../../..";
14
+$basePath = getenv("MW_INSTALL_PATH") !== false
15
+	? getenv("MW_INSTALL_PATH") : __DIR__."/../../..";
16 16
 
17
-require_once $basePath . "/maintenance/Maintenance.php";
17
+require_once $basePath."/maintenance/Maintenance.php";
18 18
 // @codeCoverageIgnoreEnd
19 19
 
20 20
 /**
@@ -46,20 +46,20 @@  discard block
 block discarded – undo
46 46
 
47 47
 	public function __construct() {
48 48
 		parent::__construct();
49
-		$this->newUpdateConstraintsTableJob = function ( $propertyIdSerialization ) {
49
+		$this->newUpdateConstraintsTableJob = function($propertyIdSerialization) {
50 50
 			return UpdateConstraintsTableJob::newFromGlobalState(
51 51
 				Title::newMainPage(),
52
-				[ 'propertyId' => $propertyIdSerialization ]
52
+				['propertyId' => $propertyIdSerialization]
53 53
 			);
54 54
 		};
55 55
 
56
-		$this->addDescription( 'Imports property constraints from statements on properties' );
57
-		$this->requireExtension( 'WikibaseQualityConstraints' );
58
-		$this->setBatchSize( 10 );
56
+		$this->addDescription('Imports property constraints from statements on properties');
57
+		$this->requireExtension('WikibaseQualityConstraints');
58
+		$this->setBatchSize(10);
59 59
 
60 60
 		// Wikibase classes are not yet loaded, so setup services in a callback run in execute
61 61
 		// that can be overridden in tests.
62
-		$this->setupServices = function () {
62
+		$this->setupServices = function() {
63 63
 			$repo = WikibaseRepo::getDefaultInstance();
64 64
 			$this->propertyInfoLookup = $repo->getStore()->getPropertyInfoLookup();
65 65
 			$this->lbFactory = MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
@@ -67,36 +67,36 @@  discard block
 block discarded – undo
67 67
 	}
68 68
 
69 69
 	public function execute() {
70
-		( $this->setupServices )();
71
-		if ( !$this->getConfig()->get( 'WBQualityConstraintsEnableConstraintsImportFromStatements' ) ) {
72
-			$this->error( 'Constraint statements are not enabled. Aborting.' );
70
+		($this->setupServices)();
71
+		if (!$this->getConfig()->get('WBQualityConstraintsEnableConstraintsImportFromStatements')) {
72
+			$this->error('Constraint statements are not enabled. Aborting.');
73 73
 			return;
74 74
 		}
75 75
 
76 76
 		$propertyInfos = $this->propertyInfoLookup->getAllPropertyInfo();
77
-		$propertyIds = array_keys( $propertyInfos );
77
+		$propertyIds = array_keys($propertyInfos);
78 78
 
79
-		foreach ( array_chunk( $propertyIds, $this->getBatchSize() ) as $propertyIdsChunk ) {
80
-			foreach ( $propertyIdsChunk as $propertyIdSerialization ) {
81
-				$this->output( sprintf(
79
+		foreach (array_chunk($propertyIds, $this->getBatchSize()) as $propertyIdsChunk) {
80
+			foreach ($propertyIdsChunk as $propertyIdSerialization) {
81
+				$this->output(sprintf(
82 82
 					'Importing constraint statements for % 6s... ',
83 83
 					$propertyIdSerialization ),
84 84
 					$propertyIdSerialization
85 85
 				);
86
-				$startTime = microtime( true );
87
-				$job = call_user_func( $this->newUpdateConstraintsTableJob, $propertyIdSerialization );
86
+				$startTime = microtime(true);
87
+				$job = call_user_func($this->newUpdateConstraintsTableJob, $propertyIdSerialization);
88 88
 				$job->run();
89
-				$endTime = microtime( true );
90
-				$millis = ( $endTime - $startTime ) * 1000;
91
-				$this->output( sprintf( 'done in % 6.2f ms.', $millis ), $propertyIdSerialization );
89
+				$endTime = microtime(true);
90
+				$millis = ($endTime - $startTime) * 1000;
91
+				$this->output(sprintf('done in % 6.2f ms.', $millis), $propertyIdSerialization);
92 92
 			}
93 93
 
94
-			$this->output( 'Waiting for replication... ', 'waitForReplication' );
95
-			$startTime = microtime( true );
94
+			$this->output('Waiting for replication... ', 'waitForReplication');
95
+			$startTime = microtime(true);
96 96
 			$this->lbFactory->waitForReplication();
97
-			$endTime = microtime( true );
98
-			$millis = ( $endTime - $startTime ) * 1000;
99
-			$this->output( sprintf( 'done in % 6.2f ms.', $millis ), 'waitForReplication' );
97
+			$endTime = microtime(true);
98
+			$millis = ($endTime - $startTime) * 1000;
99
+			$this->output(sprintf('done in % 6.2f ms.', $millis), 'waitForReplication');
100 100
 		}
101 101
 	}
102 102
 
Please login to merge, or discard this patch.
src/Job/UpdateConstraintsTableJob.php 1 patch
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -38,8 +38,8 @@  discard block
 block discarded – undo
38 38
 	 */
39 39
 	private const BATCH_SIZE = 50;
40 40
 
41
-	public static function newFromGlobalState( Title $title, array $params ) {
42
-		Assert::parameterType( 'string', $params['propertyId'], '$params["propertyId"]' );
41
+	public static function newFromGlobalState(Title $title, array $params) {
42
+		Assert::parameterType('string', $params['propertyId'], '$params["propertyId"]');
43 43
 		$services = MediaWikiServices::getInstance();
44 44
 		$repo = WikibaseRepo::getDefaultInstance();
45 45
 		return new UpdateConstraintsTableJob(
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 			$services->getMainConfig(),
51 51
 			ConstraintsServices::getConstraintStore(),
52 52
 			$services->getDBLoadBalancerFactory(),
53
-			$repo->getEntityRevisionLookup( Store::LOOKUP_CACHING_DISABLED ),
53
+			$repo->getEntityRevisionLookup(Store::LOOKUP_CACHING_DISABLED),
54 54
 			$repo->getBaseDataModelSerializerFactory()->newSnakSerializer()
55 55
 		);
56 56
 	}
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 		EntityRevisionLookup $entityRevisionLookup,
111 111
 		Serializer $snakSerializer
112 112
 	) {
113
-		parent::__construct( 'constraintsTableUpdate', $title, $params );
113
+		parent::__construct('constraintsTableUpdate', $title, $params);
114 114
 
115 115
 		$this->propertyId = $propertyId;
116 116
 		$this->revisionId = $revisionId;
@@ -121,11 +121,11 @@  discard block
 block discarded – undo
121 121
 		$this->snakSerializer = $snakSerializer;
122 122
 	}
123 123
 
124
-	public function extractParametersFromQualifiers( SnakList $qualifiers ) {
124
+	public function extractParametersFromQualifiers(SnakList $qualifiers) {
125 125
 		$parameters = [];
126
-		foreach ( $qualifiers as $qualifier ) {
126
+		foreach ($qualifiers as $qualifier) {
127 127
 			$qualifierId = $qualifier->getPropertyId()->getSerialization();
128
-			$paramSerialization = $this->snakSerializer->serialize( $qualifier );
128
+			$paramSerialization = $this->snakSerializer->serialize($qualifier);
129 129
 			$parameters[$qualifierId][] = $paramSerialization;
130 130
 		}
131 131
 		return $parameters;
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 		'@phan-var \Wikibase\DataModel\Entity\EntityIdValue $dataValue';
143 143
 		$entityId = $dataValue->getEntityId();
144 144
 		$constraintTypeQid = $entityId->getSerialization();
145
-		$parameters = $this->extractParametersFromQualifiers( $constraintStatement->getQualifiers() );
145
+		$parameters = $this->extractParametersFromQualifiers($constraintStatement->getQualifiers());
146 146
 		return new Constraint(
147 147
 			$constraintId,
148 148
 			$propertyId,
@@ -157,24 +157,24 @@  discard block
 block discarded – undo
157 157
 		PropertyId $propertyConstraintPropertyId
158 158
 	) {
159 159
 		$constraintsStatements = $property->getStatements()
160
-			->getByPropertyId( $propertyConstraintPropertyId )
161
-			->getByRank( [ Statement::RANK_PREFERRED, Statement::RANK_NORMAL ] );
160
+			->getByPropertyId($propertyConstraintPropertyId)
161
+			->getByRank([Statement::RANK_PREFERRED, Statement::RANK_NORMAL]);
162 162
 		$constraints = [];
163
-		foreach ( $constraintsStatements->getIterator() as $constraintStatement ) {
164
-			$constraints[] = $this->extractConstraintFromStatement( $property->getId(), $constraintStatement );
165
-			if ( count( $constraints ) >= self::BATCH_SIZE ) {
166
-				$constraintStore->insertBatch( $constraints );
163
+		foreach ($constraintsStatements->getIterator() as $constraintStatement) {
164
+			$constraints[] = $this->extractConstraintFromStatement($property->getId(), $constraintStatement);
165
+			if (count($constraints) >= self::BATCH_SIZE) {
166
+				$constraintStore->insertBatch($constraints);
167 167
 				// interrupt transaction and wait for replication
168
-				$connection = $this->lbFactory->getMainLB()->getConnection( DB_MASTER );
169
-				$connection->endAtomic( __CLASS__ );
170
-				if ( !$connection->explicitTrxActive() ) {
168
+				$connection = $this->lbFactory->getMainLB()->getConnection(DB_MASTER);
169
+				$connection->endAtomic(__CLASS__);
170
+				if (!$connection->explicitTrxActive()) {
171 171
 					$this->lbFactory->waitForReplication();
172 172
 				}
173
-				$connection->startAtomic( __CLASS__ );
173
+				$connection->startAtomic(__CLASS__);
174 174
 				$constraints = [];
175 175
 			}
176 176
 		}
177
-		$constraintStore->insertBatch( $constraints );
177
+		$constraintStore->insertBatch($constraints);
178 178
 	}
179 179
 
180 180
 	/**
@@ -185,24 +185,24 @@  discard block
 block discarded – undo
185 185
 	public function run() {
186 186
 		// TODO in the future: only touch constraints affected by the edit (requires T163465)
187 187
 
188
-		$propertyId = new PropertyId( $this->propertyId );
188
+		$propertyId = new PropertyId($this->propertyId);
189 189
 		$propertyRevision = $this->entityRevisionLookup->getEntityRevision(
190 190
 			$propertyId,
191 191
 			0, // latest
192 192
 			LookupConstants::LATEST_FROM_REPLICA
193 193
 		);
194 194
 
195
-		if ( $this->revisionId !== null && $propertyRevision->getRevisionId() < $this->revisionId ) {
196
-			JobQueueGroup::singleton()->push( $this );
195
+		if ($this->revisionId !== null && $propertyRevision->getRevisionId() < $this->revisionId) {
196
+			JobQueueGroup::singleton()->push($this);
197 197
 			return true;
198 198
 		}
199 199
 
200
-		$connection = $this->lbFactory->getMainLB()->getConnection( DB_MASTER );
200
+		$connection = $this->lbFactory->getMainLB()->getConnection(DB_MASTER);
201 201
 		// start transaction (if not started yet) – using __CLASS__, not __METHOD__,
202 202
 		// because importConstraintsForProperty() can interrupt the transaction
203
-		$connection->startAtomic( __CLASS__ );
203
+		$connection->startAtomic(__CLASS__);
204 204
 
205
-		$this->constraintStore->deleteForProperty( $propertyId );
205
+		$this->constraintStore->deleteForProperty($propertyId);
206 206
 
207 207
 		/** @var Property $property */
208 208
 		$property = $propertyRevision->getEntity();
@@ -210,10 +210,10 @@  discard block
 block discarded – undo
210 210
 		$this->importConstraintsForProperty(
211 211
 			$property,
212 212
 			$this->constraintStore,
213
-			new PropertyId( $this->config->get( 'WBQualityConstraintsPropertyConstraintId' ) )
213
+			new PropertyId($this->config->get('WBQualityConstraintsPropertyConstraintId'))
214 214
 		);
215 215
 
216
-		$connection->endAtomic( __CLASS__ );
216
+		$connection->endAtomic(__CLASS__);
217 217
 
218 218
 		return true;
219 219
 	}
Please login to merge, or discard this patch.
src/Api/ResultsCache.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 	 * @param WANObjectCache $cache
37 37
 	 * @param string $formatVersion The version of the API response format.
38 38
 	 */
39
-	public function __construct( WANObjectCache $cache, $formatVersion ) {
39
+	public function __construct(WANObjectCache $cache, $formatVersion) {
40 40
 		$this->cache = $cache;
41 41
 		$this->formatVersion = $formatVersion;
42 42
 	}
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 	 * @param EntityId $entityId
46 46
 	 * @return string cache key
47 47
 	 */
48
-	public function makeKey( EntityId $entityId ) {
48
+	public function makeKey(EntityId $entityId) {
49 49
 		return $this->cache->makeKey(
50 50
 			'WikibaseQualityConstraints', // extension
51 51
 			'checkConstraints', // action
@@ -61,8 +61,8 @@  discard block
 block discarded – undo
61 61
 	 * @param mixed|null &$info
62 62
 	 * @return mixed
63 63
 	 */
64
-	public function get( EntityId $key, &$curTTL = null, array $checkKeys = [], &$info = null ) {
65
-		return $this->cache->get( $this->makeKey( $key ), $curTTL, $checkKeys, $info );
64
+	public function get(EntityId $key, &$curTTL = null, array $checkKeys = [], &$info = null) {
65
+		return $this->cache->get($this->makeKey($key), $curTTL, $checkKeys, $info);
66 66
 	}
67 67
 
68 68
 	/**
@@ -72,16 +72,16 @@  discard block
 block discarded – undo
72 72
 	 * @param array $opts
73 73
 	 * @return bool
74 74
 	 */
75
-	public function set( EntityId $key, $value, $ttl = 0, array $opts = [] ) {
76
-		return $this->cache->set( $this->makeKey( $key ), $value, $ttl, $opts );
75
+	public function set(EntityId $key, $value, $ttl = 0, array $opts = []) {
76
+		return $this->cache->set($this->makeKey($key), $value, $ttl, $opts);
77 77
 	}
78 78
 
79 79
 	/**
80 80
 	 * @param EntityId $key
81 81
 	 * @return bool
82 82
 	 */
83
-	public function delete( EntityId $key ) {
84
-		return $this->cache->delete( $this->makeKey( $key ) );
83
+	public function delete(EntityId $key) {
84
+		return $this->cache->delete($this->makeKey($key));
85 85
 	}
86 86
 
87 87
 }
Please login to merge, or discard this patch.
src/ServiceWiring.php 1 patch
Spacing   +125 added lines, -125 removed lines patch added patch discarded remove patch
@@ -28,46 +28,46 @@  discard block
 block discarded – undo
28 28
 use WikibaseQuality\ConstraintReport\ConstraintCheck\Result\CheckResultSerializer;
29 29
 
30 30
 return [
31
-	ConstraintsServices::EXPIRY_LOCK => function ( MediaWikiServices $services ) {
32
-		return new ExpiryLock( ObjectCache::getInstance( CACHE_ANYTHING ) );
31
+	ConstraintsServices::EXPIRY_LOCK => function(MediaWikiServices $services) {
32
+		return new ExpiryLock(ObjectCache::getInstance(CACHE_ANYTHING));
33 33
 	},
34 34
 
35
-	ConstraintsServices::LOGGING_HELPER => function ( MediaWikiServices $services ) {
35
+	ConstraintsServices::LOGGING_HELPER => function(MediaWikiServices $services) {
36 36
 		return new LoggingHelper(
37 37
 			$services->getStatsdDataFactory(),
38
-			LoggerFactory::getInstance( 'WikibaseQualityConstraints' ),
38
+			LoggerFactory::getInstance('WikibaseQualityConstraints'),
39 39
 			$services->getMainConfig()
40 40
 		);
41 41
 	},
42 42
 
43
-	ConstraintsServices::CONSTRAINT_STORE => function ( MediaWikiServices $services ) {
43
+	ConstraintsServices::CONSTRAINT_STORE => function(MediaWikiServices $services) {
44 44
 		$wbRepo = WikibaseRepo::getDefaultInstance();
45
-		$sourceDefinitions = WikibaseRepo::getEntitySourceDefinitions( $services );
46
-		$propertySource = $sourceDefinitions->getSourceForEntityType( Property::ENTITY_TYPE );
45
+		$sourceDefinitions = WikibaseRepo::getEntitySourceDefinitions($services);
46
+		$propertySource = $sourceDefinitions->getSourceForEntityType(Property::ENTITY_TYPE);
47 47
 		$dbName = $propertySource->getDatabaseName();
48 48
 
49
-		if ( $propertySource->getSourceName() !== $wbRepo->getLocalEntitySource()->getSourceName() ) {
50
-			throw new \RuntimeException( 'Can\'t get a ConstraintStore for a non local entity source.' );
49
+		if ($propertySource->getSourceName() !== $wbRepo->getLocalEntitySource()->getSourceName()) {
50
+			throw new \RuntimeException('Can\'t get a ConstraintStore for a non local entity source.');
51 51
 		}
52 52
 
53 53
 		return new ConstraintRepositoryStore(
54
-			$services->getDBLoadBalancerFactory()->getMainLB( $dbName ),
54
+			$services->getDBLoadBalancerFactory()->getMainLB($dbName),
55 55
 			$dbName
56 56
 		);
57 57
 	},
58 58
 
59
-	ConstraintsServices::CONSTRAINT_LOOKUP => function ( MediaWikiServices $services ) {
60
-		$sourceDefinitions = WikibaseRepo::getEntitySourceDefinitions( $services );
61
-		$propertySource = $sourceDefinitions->getSourceForEntityType( Property::ENTITY_TYPE );
59
+	ConstraintsServices::CONSTRAINT_LOOKUP => function(MediaWikiServices $services) {
60
+		$sourceDefinitions = WikibaseRepo::getEntitySourceDefinitions($services);
61
+		$propertySource = $sourceDefinitions->getSourceForEntityType(Property::ENTITY_TYPE);
62 62
 		$dbName = $propertySource->getDatabaseName();
63 63
 		$rawLookup = new ConstraintRepositoryLookup(
64
-			$services->getDBLoadBalancerFactory()->getMainLB( $dbName ),
64
+			$services->getDBLoadBalancerFactory()->getMainLB($dbName),
65 65
 			$dbName
66 66
 		);
67
-		return new CachingConstraintLookup( $rawLookup );
67
+		return new CachingConstraintLookup($rawLookup);
68 68
 	},
69 69
 
70
-	ConstraintsServices::CHECK_RESULT_SERIALIZER => function ( MediaWikiServices $services ) {
70
+	ConstraintsServices::CHECK_RESULT_SERIALIZER => function(MediaWikiServices $services) {
71 71
 		return new CheckResultSerializer(
72 72
 			new ConstraintSerializer(
73 73
 				false // constraint parameters are not exposed
@@ -78,9 +78,9 @@  discard block
 block discarded – undo
78 78
 		);
79 79
 	},
80 80
 
81
-	ConstraintsServices::CHECK_RESULT_DESERIALIZER => function ( MediaWikiServices $services ) {
82
-		$entityIdParser = WikibaseRepo::getEntityIdParser( $services );
83
-		$dataValueFactory = WikibaseRepo::getDataValueFactory( $services );
81
+	ConstraintsServices::CHECK_RESULT_DESERIALIZER => function(MediaWikiServices $services) {
82
+		$entityIdParser = WikibaseRepo::getEntityIdParser($services);
83
+		$dataValueFactory = WikibaseRepo::getDataValueFactory($services);
84 84
 
85 85
 		return new CheckResultDeserializer(
86 86
 			new ConstraintDeserializer(),
@@ -93,13 +93,13 @@  discard block
 block discarded – undo
93 93
 		);
94 94
 	},
95 95
 
96
-	ConstraintsServices::VIOLATION_MESSAGE_SERIALIZER => function ( MediaWikiServices $services ) {
96
+	ConstraintsServices::VIOLATION_MESSAGE_SERIALIZER => function(MediaWikiServices $services) {
97 97
 		return new ViolationMessageSerializer();
98 98
 	},
99 99
 
100
-	ConstraintsServices::VIOLATION_MESSAGE_DESERIALIZER => function ( MediaWikiServices $services ) {
101
-		$entityIdParser = WikibaseRepo::getEntityIdParser( $services );
102
-		$dataValueFactory = WikibaseRepo::getDataValueFactory( $services );
100
+	ConstraintsServices::VIOLATION_MESSAGE_DESERIALIZER => function(MediaWikiServices $services) {
101
+		$entityIdParser = WikibaseRepo::getEntityIdParser($services);
102
+		$dataValueFactory = WikibaseRepo::getDataValueFactory($services);
103 103
 
104 104
 		return new ViolationMessageDeserializer(
105 105
 			$entityIdParser,
@@ -107,24 +107,24 @@  discard block
 block discarded – undo
107 107
 		);
108 108
 	},
109 109
 
110
-	ConstraintsServices::CONSTRAINT_PARAMETER_PARSER => function ( MediaWikiServices $services ) {
110
+	ConstraintsServices::CONSTRAINT_PARAMETER_PARSER => function(MediaWikiServices $services) {
111 111
 		// TODO in the future, get DeserializerFactory from $services?
112 112
 		$repo = WikibaseRepo::getDefaultInstance();
113 113
 		$deserializerFactory = $repo->getBaseDataModelDeserializerFactory();
114
-		$entitySourceDefinitions = WikibaseRepo::getEntitySourceDefinitions( $services );
114
+		$entitySourceDefinitions = WikibaseRepo::getEntitySourceDefinitions($services);
115 115
 
116 116
 		return new ConstraintParameterParser(
117 117
 			$services->getMainConfig(),
118 118
 			$deserializerFactory,
119
-			$entitySourceDefinitions->getSourceForEntityType( 'item' )->getConceptBaseUri()
119
+			$entitySourceDefinitions->getSourceForEntityType('item')->getConceptBaseUri()
120 120
 		);
121 121
 	},
122 122
 
123
-	ConstraintsServices::CONNECTION_CHECKER_HELPER => function ( MediaWikiServices $services ) {
123
+	ConstraintsServices::CONNECTION_CHECKER_HELPER => function(MediaWikiServices $services) {
124 124
 		return new ConnectionCheckerHelper();
125 125
 	},
126 126
 
127
-	ConstraintsServices::RANGE_CHECKER_HELPER => function ( MediaWikiServices $services ) {
127
+	ConstraintsServices::RANGE_CHECKER_HELPER => function(MediaWikiServices $services) {
128 128
 		// TODO in the future, get UnitConverter from $services?
129 129
 		$repo = WikibaseRepo::getDefaultInstance();
130 130
 		$unitConverter = $repo->getUnitConverter();
@@ -135,16 +135,16 @@  discard block
 block discarded – undo
135 135
 		);
136 136
 	},
137 137
 
138
-	ConstraintsServices::SPARQL_HELPER => function ( MediaWikiServices $services ) {
139
-		$endpoint = $services->getMainConfig()->get( 'WBQualityConstraintsSparqlEndpoint' );
140
-		if ( $endpoint === '' ) {
138
+	ConstraintsServices::SPARQL_HELPER => function(MediaWikiServices $services) {
139
+		$endpoint = $services->getMainConfig()->get('WBQualityConstraintsSparqlEndpoint');
140
+		if ($endpoint === '') {
141 141
 			return new DummySparqlHelper();
142 142
 		}
143 143
 
144 144
 		// TODO in the future, get RDFVocabulary and PropertyDataTypeLookup from $services?
145 145
 		$repo = WikibaseRepo::getDefaultInstance();
146 146
 		$rdfVocabulary = $repo->getRdfVocabulary();
147
-		$entityIdParser = WikibaseRepo::getEntityIdParser( $services );
147
+		$entityIdParser = WikibaseRepo::getEntityIdParser($services);
148 148
 		$propertyDataTypeLookup = $repo->getPropertyDataTypeLookup();
149 149
 
150 150
 		return new SparqlHelper(
@@ -153,121 +153,121 @@  discard block
 block discarded – undo
153 153
 			$entityIdParser,
154 154
 			$propertyDataTypeLookup,
155 155
 			$services->getMainWANObjectCache(),
156
-			ConstraintsServices::getViolationMessageSerializer( $services ),
157
-			ConstraintsServices::getViolationMessageDeserializer( $services ),
156
+			ConstraintsServices::getViolationMessageSerializer($services),
157
+			ConstraintsServices::getViolationMessageDeserializer($services),
158 158
 			$services->getStatsdDataFactory(),
159
-			ConstraintsServices::getExpiryLock( $services ),
159
+			ConstraintsServices::getExpiryLock($services),
160 160
 			ConstraintsServices::getLoggingHelper(),
161
-			wfWikiID() . ' WikibaseQualityConstraints ' . Http::userAgent(),
161
+			wfWikiID().' WikibaseQualityConstraints '.Http::userAgent(),
162 162
 			$services->getHttpRequestFactory()
163 163
 		);
164 164
 	},
165 165
 
166
-	ConstraintsServices::TYPE_CHECKER_HELPER => function ( MediaWikiServices $services ) {
166
+	ConstraintsServices::TYPE_CHECKER_HELPER => function(MediaWikiServices $services) {
167 167
 		return new TypeCheckerHelper(
168
-			WikibaseServices::getEntityLookup( $services ),
168
+			WikibaseServices::getEntityLookup($services),
169 169
 			$services->getMainConfig(),
170
-			ConstraintsServices::getSparqlHelper( $services ),
170
+			ConstraintsServices::getSparqlHelper($services),
171 171
 			$services->getStatsdDataFactory()
172 172
 		);
173 173
 	},
174 174
 
175
-	ConstraintsServices::DELEGATING_CONSTRAINT_CHECKER => function ( MediaWikiServices $services ) {
176
-		$statementGuidParser = WikibaseRepo::getStatementGuidParser( $services );
175
+	ConstraintsServices::DELEGATING_CONSTRAINT_CHECKER => function(MediaWikiServices $services) {
176
+		$statementGuidParser = WikibaseRepo::getStatementGuidParser($services);
177 177
 
178 178
 		$config = $services->getMainConfig();
179 179
 		$checkerMap = [
180
-			$config->get( 'WBQualityConstraintsConflictsWithConstraintId' )
181
-				=> ConstraintCheckerServices::getConflictsWithChecker( $services ),
182
-			$config->get( 'WBQualityConstraintsItemRequiresClaimConstraintId' )
183
-				=> ConstraintCheckerServices::getItemChecker( $services ),
184
-			$config->get( 'WBQualityConstraintsValueRequiresClaimConstraintId' )
185
-				=> ConstraintCheckerServices::getTargetRequiredClaimChecker( $services ),
186
-			$config->get( 'WBQualityConstraintsSymmetricConstraintId' )
187
-				=> ConstraintCheckerServices::getSymmetricChecker( $services ),
188
-			$config->get( 'WBQualityConstraintsInverseConstraintId' )
189
-				=> ConstraintCheckerServices::getInverseChecker( $services ),
190
-			$config->get( 'WBQualityConstraintsUsedAsQualifierConstraintId' )
191
-				=> ConstraintCheckerServices::getQualifierChecker( $services ),
192
-			$config->get( 'WBQualityConstraintsAllowedQualifiersConstraintId' )
193
-				=> ConstraintCheckerServices::getQualifiersChecker( $services ),
194
-			$config->get( 'WBQualityConstraintsMandatoryQualifierConstraintId' )
195
-				=> ConstraintCheckerServices::getMandatoryQualifiersChecker( $services ),
196
-			$config->get( 'WBQualityConstraintsRangeConstraintId' )
197
-				=> ConstraintCheckerServices::getRangeChecker( $services ),
198
-			$config->get( 'WBQualityConstraintsDifferenceWithinRangeConstraintId' )
199
-				=> ConstraintCheckerServices::getDiffWithinRangeChecker( $services ),
200
-			$config->get( 'WBQualityConstraintsTypeConstraintId' )
201
-				=> ConstraintCheckerServices::getTypeChecker( $services ),
202
-			$config->get( 'WBQualityConstraintsValueTypeConstraintId' )
203
-				=> ConstraintCheckerServices::getValueTypeChecker( $services ),
204
-			$config->get( 'WBQualityConstraintsSingleValueConstraintId' )
205
-				=> ConstraintCheckerServices::getSingleValueChecker( $services ),
206
-			$config->get( 'WBQualityConstraintsMultiValueConstraintId' )
207
-				=> ConstraintCheckerServices::getMultiValueChecker( $services ),
208
-			$config->get( 'WBQualityConstraintsDistinctValuesConstraintId' )
209
-				=> ConstraintCheckerServices::getUniqueValueChecker( $services ),
210
-			$config->get( 'WBQualityConstraintsFormatConstraintId' )
211
-				=> ConstraintCheckerServices::getFormatChecker( $services ),
212
-			$config->get( 'WBQualityConstraintsCommonsLinkConstraintId' )
213
-				=> ConstraintCheckerServices::getCommonsLinkChecker( $services ),
214
-			$config->get( 'WBQualityConstraintsOneOfConstraintId' )
215
-				=> ConstraintCheckerServices::getOneOfChecker( $services ),
216
-			$config->get( 'WBQualityConstraintsUsedForValuesOnlyConstraintId' )
217
-				=> ConstraintCheckerServices::getValueOnlyChecker( $services ),
218
-			$config->get( 'WBQualityConstraintsUsedAsReferenceConstraintId' )
219
-				=> ConstraintCheckerServices::getReferenceChecker( $services ),
220
-			$config->get( 'WBQualityConstraintsNoBoundsConstraintId' )
221
-				=> ConstraintCheckerServices::getNoBoundsChecker( $services ),
222
-			$config->get( 'WBQualityConstraintsAllowedUnitsConstraintId' )
223
-				=> ConstraintCheckerServices::getAllowedUnitsChecker( $services ),
224
-			$config->get( 'WBQualityConstraintsSingleBestValueConstraintId' )
225
-				=> ConstraintCheckerServices::getSingleBestValueChecker( $services ),
226
-			$config->get( 'WBQualityConstraintsAllowedEntityTypesConstraintId' )
227
-				=> ConstraintCheckerServices::getEntityTypeChecker( $services ),
228
-			$config->get( 'WBQualityConstraintsNoneOfConstraintId' )
229
-				=> ConstraintCheckerServices::getNoneOfChecker( $services ),
230
-			$config->get( 'WBQualityConstraintsIntegerConstraintId' )
231
-				=> ConstraintCheckerServices::getIntegerChecker( $services ),
232
-			$config->get( 'WBQualityConstraintsCitationNeededConstraintId' )
233
-				=> ConstraintCheckerServices::getCitationNeededChecker( $services ),
234
-			$config->get( 'WBQualityConstraintsPropertyScopeConstraintId' )
235
-				=> ConstraintCheckerServices::getPropertyScopeChecker( $services ),
236
-			$config->get( 'WBQualityConstraintsContemporaryConstraintId' )
237
-				=> ConstraintCheckerServices::getContemporaryChecker( $services ),
180
+			$config->get('WBQualityConstraintsConflictsWithConstraintId')
181
+				=> ConstraintCheckerServices::getConflictsWithChecker($services),
182
+			$config->get('WBQualityConstraintsItemRequiresClaimConstraintId')
183
+				=> ConstraintCheckerServices::getItemChecker($services),
184
+			$config->get('WBQualityConstraintsValueRequiresClaimConstraintId')
185
+				=> ConstraintCheckerServices::getTargetRequiredClaimChecker($services),
186
+			$config->get('WBQualityConstraintsSymmetricConstraintId')
187
+				=> ConstraintCheckerServices::getSymmetricChecker($services),
188
+			$config->get('WBQualityConstraintsInverseConstraintId')
189
+				=> ConstraintCheckerServices::getInverseChecker($services),
190
+			$config->get('WBQualityConstraintsUsedAsQualifierConstraintId')
191
+				=> ConstraintCheckerServices::getQualifierChecker($services),
192
+			$config->get('WBQualityConstraintsAllowedQualifiersConstraintId')
193
+				=> ConstraintCheckerServices::getQualifiersChecker($services),
194
+			$config->get('WBQualityConstraintsMandatoryQualifierConstraintId')
195
+				=> ConstraintCheckerServices::getMandatoryQualifiersChecker($services),
196
+			$config->get('WBQualityConstraintsRangeConstraintId')
197
+				=> ConstraintCheckerServices::getRangeChecker($services),
198
+			$config->get('WBQualityConstraintsDifferenceWithinRangeConstraintId')
199
+				=> ConstraintCheckerServices::getDiffWithinRangeChecker($services),
200
+			$config->get('WBQualityConstraintsTypeConstraintId')
201
+				=> ConstraintCheckerServices::getTypeChecker($services),
202
+			$config->get('WBQualityConstraintsValueTypeConstraintId')
203
+				=> ConstraintCheckerServices::getValueTypeChecker($services),
204
+			$config->get('WBQualityConstraintsSingleValueConstraintId')
205
+				=> ConstraintCheckerServices::getSingleValueChecker($services),
206
+			$config->get('WBQualityConstraintsMultiValueConstraintId')
207
+				=> ConstraintCheckerServices::getMultiValueChecker($services),
208
+			$config->get('WBQualityConstraintsDistinctValuesConstraintId')
209
+				=> ConstraintCheckerServices::getUniqueValueChecker($services),
210
+			$config->get('WBQualityConstraintsFormatConstraintId')
211
+				=> ConstraintCheckerServices::getFormatChecker($services),
212
+			$config->get('WBQualityConstraintsCommonsLinkConstraintId')
213
+				=> ConstraintCheckerServices::getCommonsLinkChecker($services),
214
+			$config->get('WBQualityConstraintsOneOfConstraintId')
215
+				=> ConstraintCheckerServices::getOneOfChecker($services),
216
+			$config->get('WBQualityConstraintsUsedForValuesOnlyConstraintId')
217
+				=> ConstraintCheckerServices::getValueOnlyChecker($services),
218
+			$config->get('WBQualityConstraintsUsedAsReferenceConstraintId')
219
+				=> ConstraintCheckerServices::getReferenceChecker($services),
220
+			$config->get('WBQualityConstraintsNoBoundsConstraintId')
221
+				=> ConstraintCheckerServices::getNoBoundsChecker($services),
222
+			$config->get('WBQualityConstraintsAllowedUnitsConstraintId')
223
+				=> ConstraintCheckerServices::getAllowedUnitsChecker($services),
224
+			$config->get('WBQualityConstraintsSingleBestValueConstraintId')
225
+				=> ConstraintCheckerServices::getSingleBestValueChecker($services),
226
+			$config->get('WBQualityConstraintsAllowedEntityTypesConstraintId')
227
+				=> ConstraintCheckerServices::getEntityTypeChecker($services),
228
+			$config->get('WBQualityConstraintsNoneOfConstraintId')
229
+				=> ConstraintCheckerServices::getNoneOfChecker($services),
230
+			$config->get('WBQualityConstraintsIntegerConstraintId')
231
+				=> ConstraintCheckerServices::getIntegerChecker($services),
232
+			$config->get('WBQualityConstraintsCitationNeededConstraintId')
233
+				=> ConstraintCheckerServices::getCitationNeededChecker($services),
234
+			$config->get('WBQualityConstraintsPropertyScopeConstraintId')
235
+				=> ConstraintCheckerServices::getPropertyScopeChecker($services),
236
+			$config->get('WBQualityConstraintsContemporaryConstraintId')
237
+				=> ConstraintCheckerServices::getContemporaryChecker($services),
238 238
 		];
239 239
 
240 240
 		return new DelegatingConstraintChecker(
241
-			WikibaseServices::getEntityLookup( $services ),
241
+			WikibaseServices::getEntityLookup($services),
242 242
 			$checkerMap,
243
-			ConstraintsServices::getConstraintLookup( $services ),
244
-			ConstraintsServices::getConstraintParameterParser( $services ),
243
+			ConstraintsServices::getConstraintLookup($services),
244
+			ConstraintsServices::getConstraintParameterParser($services),
245 245
 			$statementGuidParser,
246
-			ConstraintsServices::getLoggingHelper( $services ),
247
-			$config->get( 'WBQualityConstraintsCheckQualifiers' ),
248
-			$config->get( 'WBQualityConstraintsCheckReferences' ),
249
-			$config->get( 'WBQualityConstraintsPropertiesWithViolatingQualifiers' )
246
+			ConstraintsServices::getLoggingHelper($services),
247
+			$config->get('WBQualityConstraintsCheckQualifiers'),
248
+			$config->get('WBQualityConstraintsCheckReferences'),
249
+			$config->get('WBQualityConstraintsPropertiesWithViolatingQualifiers')
250 250
 		);
251 251
 	},
252 252
 
253
-	ConstraintsServices::RESULTS_SOURCE => function ( MediaWikiServices $services ) {
253
+	ConstraintsServices::RESULTS_SOURCE => function(MediaWikiServices $services) {
254 254
 		$config = $services->getMainConfig();
255 255
 		$resultsSource = new CheckingResultsSource(
256
-			ConstraintsServices::getDelegatingConstraintChecker( $services )
256
+			ConstraintsServices::getDelegatingConstraintChecker($services)
257 257
 		);
258 258
 
259 259
 		$cacheCheckConstraintsResults = false;
260 260
 
261
-		if ( $config->get( 'WBQualityConstraintsCacheCheckConstraintsResults' ) ) {
261
+		if ($config->get('WBQualityConstraintsCacheCheckConstraintsResults')) {
262 262
 			$cacheCheckConstraintsResults = true;
263 263
 			// check that we can use getLocalRepoWikiPageMetaDataAccessor()
264 264
 			// TODO we should always be able to cache constraint check results (T244726)
265 265
 			$repo = WikibaseRepo::getDefaultInstance();
266
-			$entitySources = WikibaseRepo::getEntitySourceDefinitions( $services )->getSources();
267
-			foreach ( $entitySources as $entitySource ) {
268
-				if ( $entitySource->getSourceName() !== $repo->getLocalEntitySource()->getSourceName() ) {
269
-					LoggerFactory::getInstance( 'WikibaseQualityConstraints' )->warning(
270
-						'Cannot cache constraint check results for non-local source: ' .
266
+			$entitySources = WikibaseRepo::getEntitySourceDefinitions($services)->getSources();
267
+			foreach ($entitySources as $entitySource) {
268
+				if ($entitySource->getSourceName() !== $repo->getLocalEntitySource()->getSourceName()) {
269
+					LoggerFactory::getInstance('WikibaseQualityConstraints')->warning(
270
+						'Cannot cache constraint check results for non-local source: '.
271 271
 						$entitySource->getSourceName()
272 272
 					);
273 273
 					$cacheCheckConstraintsResults = false;
@@ -276,29 +276,29 @@  discard block
 block discarded – undo
276 276
 			}
277 277
 		}
278 278
 
279
-		if ( $cacheCheckConstraintsResults ) {
279
+		if ($cacheCheckConstraintsResults) {
280 280
 			$possiblyStaleConstraintTypes = [
281
-				$config->get( 'WBQualityConstraintsCommonsLinkConstraintId' ),
282
-				$config->get( 'WBQualityConstraintsTypeConstraintId' ),
283
-				$config->get( 'WBQualityConstraintsValueTypeConstraintId' ),
284
-				$config->get( 'WBQualityConstraintsDistinctValuesConstraintId' ),
281
+				$config->get('WBQualityConstraintsCommonsLinkConstraintId'),
282
+				$config->get('WBQualityConstraintsTypeConstraintId'),
283
+				$config->get('WBQualityConstraintsValueTypeConstraintId'),
284
+				$config->get('WBQualityConstraintsDistinctValuesConstraintId'),
285 285
 			];
286 286
 			// TODO in the future, get WikiPageEntityMetaDataAccessor from $services?
287 287
 			$repo = WikibaseRepo::getDefaultInstance();
288
-			$entityIdParser = WikibaseRepo::getEntityIdParser( $services );
288
+			$entityIdParser = WikibaseRepo::getEntityIdParser($services);
289 289
 			$wikiPageEntityMetaDataAccessor = $repo->getLocalRepoWikiPageMetaDataAccessor();
290 290
 
291 291
 			$resultsSource = new CachingResultsSource(
292 292
 				$resultsSource,
293 293
 				ResultsCache::getDefaultInstance(),
294
-				ConstraintsServices::getCheckResultSerializer( $services ),
295
-				ConstraintsServices::getCheckResultDeserializer( $services ),
294
+				ConstraintsServices::getCheckResultSerializer($services),
295
+				ConstraintsServices::getCheckResultDeserializer($services),
296 296
 				$wikiPageEntityMetaDataAccessor,
297 297
 				$entityIdParser,
298
-				$config->get( 'WBQualityConstraintsCacheCheckConstraintsTTLSeconds' ),
298
+				$config->get('WBQualityConstraintsCacheCheckConstraintsTTLSeconds'),
299 299
 				$possiblyStaleConstraintTypes,
300
-				$config->get( 'WBQualityConstraintsCacheCheckConstraintsMaximumRevisionIds' ),
301
-				ConstraintsServices::getLoggingHelper( $services )
300
+				$config->get('WBQualityConstraintsCacheCheckConstraintsMaximumRevisionIds'),
301
+				ConstraintsServices::getLoggingHelper($services)
302 302
 			);
303 303
 		}
304 304
 
Please login to merge, or discard this patch.