Completed
Push — master ( cc423d...6e67d8 )
by
unknown
21s
created
src/ConstraintCheck/Checker/QualifierChecker.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -44,16 +44,16 @@
 block discarded – undo
44 44
 	 *
45 45
 	 * @return CheckResult
46 46
 	 */
47
-	public function checkConstraint( Context $context, Constraint $constraint ): CheckResult {
48
-		if ( $context->getType() === Context::TYPE_QUALIFIER ) {
49
-			return new CheckResult( $context, $constraint, CheckResult::STATUS_COMPLIANCE );
47
+	public function checkConstraint(Context $context, Constraint $constraint): CheckResult {
48
+		if ($context->getType() === Context::TYPE_QUALIFIER) {
49
+			return new CheckResult($context, $constraint, CheckResult::STATUS_COMPLIANCE);
50 50
 		} else {
51
-			$message = new ViolationMessage( 'wbqc-violation-message-qualifier' );
52
-			return new CheckResult( $context, $constraint, CheckResult::STATUS_VIOLATION, $message );
51
+			$message = new ViolationMessage('wbqc-violation-message-qualifier');
52
+			return new CheckResult($context, $constraint, CheckResult::STATUS_VIOLATION, $message);
53 53
 		}
54 54
 	}
55 55
 
56
-	public function checkConstraintParameters( Constraint $constraint ): array {
56
+	public function checkConstraintParameters(Constraint $constraint): array {
57 57
 		// no parameters
58 58
 		return [];
59 59
 	}
Please login to merge, or discard this patch.
src/ConstraintCheck/Checker/OneOfChecker.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -57,9 +57,9 @@  discard block
 block discarded – undo
57 57
 	 * @throws ConstraintParameterException
58 58
 	 * @return CheckResult
59 59
 	 */
60
-	public function checkConstraint( Context $context, Constraint $constraint ): CheckResult {
61
-		if ( $context->getSnakRank() === Statement::RANK_DEPRECATED ) {
62
-			return new CheckResult( $context, $constraint, CheckResult::STATUS_DEPRECATED );
60
+	public function checkConstraint(Context $context, Constraint $constraint): CheckResult {
61
+		if ($context->getSnakRank() === Statement::RANK_DEPRECATED) {
62
+			return new CheckResult($context, $constraint, CheckResult::STATUS_DEPRECATED);
63 63
 		}
64 64
 
65 65
 		$constraintParameters = $constraint->getConstraintParameters();
@@ -73,23 +73,23 @@  discard block
 block discarded – undo
73 73
 
74 74
 		$snak = $context->getSnak();
75 75
 
76
-		$message = ( new ViolationMessage( 'wbqc-violation-message-one-of' ) )
77
-			->withEntityId( $context->getSnak()->getPropertyId(), Role::PREDICATE )
78
-			->withItemIdSnakValueList( $items, Role::OBJECT );
76
+		$message = (new ViolationMessage('wbqc-violation-message-one-of'))
77
+			->withEntityId($context->getSnak()->getPropertyId(), Role::PREDICATE)
78
+			->withItemIdSnakValueList($items, Role::OBJECT);
79 79
 		$status = CheckResult::STATUS_VIOLATION;
80 80
 
81
-		foreach ( $items as $item ) {
82
-			if ( $item->matchesSnak( $snak ) ) {
81
+		foreach ($items as $item) {
82
+			if ($item->matchesSnak($snak)) {
83 83
 				$message = null;
84 84
 				$status = CheckResult::STATUS_COMPLIANCE;
85 85
 				break;
86 86
 			}
87 87
 		}
88 88
 
89
-		return new CheckResult( $context, $constraint, $status, $message );
89
+		return new CheckResult($context, $constraint, $status, $message);
90 90
 	}
91 91
 
92
-	public function checkConstraintParameters( Constraint $constraint ): array {
92
+	public function checkConstraintParameters(Constraint $constraint): array {
93 93
 		$constraintParameters = $constraint->getConstraintParameters();
94 94
 		$constraintTypeItemId = $constraint->getConstraintTypeItemId();
95 95
 		$exceptions = [];
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 				$constraintTypeItemId,
100 100
 				true
101 101
 			);
102
-		} catch ( ConstraintParameterException $e ) {
102
+		} catch (ConstraintParameterException $e) {
103 103
 			$exceptions[] = $e;
104 104
 		}
105 105
 		return $exceptions;
Please login to merge, or discard this patch.
src/ConstraintCheck/Checker/Lexeme/LanguageChecker.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -76,9 +76,9 @@  discard block
 block discarded – undo
76 76
 	 * @throws ConstraintParameterException
77 77
 	 * @return CheckResult
78 78
 	 */
79
-	public function checkConstraint( Context $context, Constraint $constraint ): CheckResult {
80
-		if ( $context->getSnakRank() === Statement::RANK_DEPRECATED ) {
81
-			return new CheckResult( $context, $constraint, CheckResult::STATUS_DEPRECATED );
79
+	public function checkConstraint(Context $context, Constraint $constraint): CheckResult {
80
+		if ($context->getSnakRank() === Statement::RANK_DEPRECATED) {
81
+			return new CheckResult($context, $constraint, CheckResult::STATUS_DEPRECATED);
82 82
 		}
83 83
 
84 84
 		$constraintParameters = $constraint->getConstraintParameters();
@@ -90,50 +90,50 @@  discard block
 block discarded – undo
90 90
 			true
91 91
 		);
92 92
 
93
-		$message = ( new ViolationMessage( 'wbqc-violation-message-language' ) )
94
-			->withEntityId( $context->getSnak()->getPropertyId(), Role::PREDICATE )
95
-			->withItemIdSnakValueList( $languages, Role::OBJECT );
93
+		$message = (new ViolationMessage('wbqc-violation-message-language'))
94
+			->withEntityId($context->getSnak()->getPropertyId(), Role::PREDICATE)
95
+			->withItemIdSnakValueList($languages, Role::OBJECT);
96 96
 		$status = CheckResult::STATUS_VIOLATION;
97 97
 
98
-		$lexeme = $this->getLexeme( $context );
99
-		if ( !$lexeme ) {
98
+		$lexeme = $this->getLexeme($context);
99
+		if (!$lexeme) {
100 100
 			// Lexeme doesn't exist, let's not bother
101
-			return new CheckResult( $context, $constraint, CheckResult::STATUS_NOT_IN_SCOPE );
101
+			return new CheckResult($context, $constraint, CheckResult::STATUS_NOT_IN_SCOPE);
102 102
 		}
103 103
 
104 104
 		/** @var Lexeme $lexeme */
105 105
 		'@phan-var Lexeme $lexeme';
106 106
 
107
-		foreach ( $languages as $language ) {
108
-			if ( $language->isNoValue() || $language->isSomeValue() ) {
107
+		foreach ($languages as $language) {
108
+			if ($language->isNoValue() || $language->isSomeValue()) {
109 109
 				continue;
110 110
 			}
111
-			if ( $lexeme->getLanguage()->equals( $language->getItemId() ) ) {
111
+			if ($lexeme->getLanguage()->equals($language->getItemId())) {
112 112
 				$message = null;
113 113
 				$status = CheckResult::STATUS_COMPLIANCE;
114 114
 				break;
115 115
 			}
116 116
 		}
117 117
 
118
-		return new CheckResult( $context, $constraint, $status, $message );
118
+		return new CheckResult($context, $constraint, $status, $message);
119 119
 	}
120 120
 
121
-	private function getLexeme( Context $context ): ?EntityDocument {
121
+	private function getLexeme(Context $context): ?EntityDocument {
122 122
 		$entityType = $context->getEntity()->getType();
123 123
 
124
-		if ( $entityType === Lexeme::ENTITY_TYPE ) {
124
+		if ($entityType === Lexeme::ENTITY_TYPE) {
125 125
 			return $context->getEntity();
126 126
 		}
127 127
 
128
-		if ( in_array( $entityType, [ Form::ENTITY_TYPE, Sense::ENTITY_TYPE ] ) ) {
128
+		if (in_array($entityType, [Form::ENTITY_TYPE, Sense::ENTITY_TYPE])) {
129 129
 			/** @var LexemeSubEntityId $id */
130 130
 			$id = $context->getEntity()->getId();
131 131
 			'@phan-var LexemeSubEntityId $id';
132
-			return $this->entityLookup->getEntity( $id->getLexemeId() );
132
+			return $this->entityLookup->getEntity($id->getLexemeId());
133 133
 		}
134 134
 	}
135 135
 
136
-	public function checkConstraintParameters( Constraint $constraint ): array {
136
+	public function checkConstraintParameters(Constraint $constraint): array {
137 137
 		$constraintParameters = $constraint->getConstraintParameters();
138 138
 		$constraintTypeItemId = $constraint->getConstraintTypeItemId();
139 139
 		$exceptions = [];
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
 				$constraintTypeItemId,
144 144
 				true
145 145
 			);
146
-		} catch ( ConstraintParameterException $e ) {
146
+		} catch (ConstraintParameterException $e) {
147 147
 			$exceptions[] = $e;
148 148
 		}
149 149
 		return $exceptions;
Please login to merge, or discard this patch.
src/ConstraintCheck/Checker/NoBoundsChecker.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -36,17 +36,17 @@  discard block
 block discarded – undo
36 36
 		return self::ALL_ENTITY_TYPES_SUPPORTED;
37 37
 	}
38 38
 
39
-	public function checkConstraint( Context $context, Constraint $constraint ): CheckResult {
39
+	public function checkConstraint(Context $context, Constraint $constraint): CheckResult {
40 40
 		$snak = $context->getSnak();
41 41
 
42
-		if ( !$snak instanceof PropertyValueSnak ) {
42
+		if (!$snak instanceof PropertyValueSnak) {
43 43
 			// nothing to check
44
-			return new CheckResult( $context, $constraint, CheckResult::STATUS_COMPLIANCE );
44
+			return new CheckResult($context, $constraint, CheckResult::STATUS_COMPLIANCE);
45 45
 		}
46 46
 
47
-		if ( $snak->getDataValue() instanceof QuantityValue ) {
48
-			$message = ( new ViolationMessage( 'wbqc-violation-message-noBounds' ) )
49
-				->withEntityId( $context->getSnak()->getPropertyId(), Role::CONSTRAINT_PROPERTY );
47
+		if ($snak->getDataValue() instanceof QuantityValue) {
48
+			$message = (new ViolationMessage('wbqc-violation-message-noBounds'))
49
+				->withEntityId($context->getSnak()->getPropertyId(), Role::CONSTRAINT_PROPERTY);
50 50
 			return new CheckResult(
51 51
 				$context,
52 52
 				$constraint,
@@ -55,10 +55,10 @@  discard block
 block discarded – undo
55 55
 			);
56 56
 		}
57 57
 
58
-		return new CheckResult( $context, $constraint, CheckResult::STATUS_COMPLIANCE );
58
+		return new CheckResult($context, $constraint, CheckResult::STATUS_COMPLIANCE);
59 59
 	}
60 60
 
61
-	public function checkConstraintParameters( Constraint $constraint ): array {
61
+	public function checkConstraintParameters(Constraint $constraint): array {
62 62
 		// no parameters
63 63
 		return [];
64 64
 	}
Please login to merge, or discard this patch.
src/ConstraintCheck/Checker/InverseChecker.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -89,9 +89,9 @@  discard block
 block discarded – undo
89 89
 	 * @throws ConstraintParameterException
90 90
 	 * @return CheckResult
91 91
 	 */
92
-	public function checkConstraint( Context $context, Constraint $constraint ): CheckResult {
93
-		if ( $context->getSnakRank() === Statement::RANK_DEPRECATED ) {
94
-			return new CheckResult( $context, $constraint, CheckResult::STATUS_DEPRECATED );
92
+	public function checkConstraint(Context $context, Constraint $constraint): CheckResult {
93
+		if ($context->getSnakRank() === Statement::RANK_DEPRECATED) {
94
+			return new CheckResult($context, $constraint, CheckResult::STATUS_DEPRECATED);
95 95
 		}
96 96
 
97 97
 		$constraintParameters = $constraint->getConstraintParameters();
@@ -104,9 +104,9 @@  discard block
 block discarded – undo
104 104
 
105 105
 		$snak = $context->getSnak();
106 106
 
107
-		if ( !$snak instanceof PropertyValueSnak ) {
107
+		if (!$snak instanceof PropertyValueSnak) {
108 108
 			// nothing to check
109
-			return new CheckResult( $context, $constraint, CheckResult::STATUS_COMPLIANCE );
109
+			return new CheckResult($context, $constraint, CheckResult::STATUS_COMPLIANCE);
110 110
 		}
111 111
 
112 112
 		$dataValue = $snak->getDataValue();
@@ -115,18 +115,18 @@  discard block
 block discarded – undo
115 115
 		 * error handling:
116 116
 		 *   type of $dataValue for properties with 'Inverse' constraint has to be 'wikibase-entityid'
117 117
 		 */
118
-		if ( !$dataValue instanceof EntityIdValue ) {
119
-			$message = ( new ViolationMessage( 'wbqc-violation-message-value-needed-of-type' ) )
120
-				->withEntityId( new ItemId( $constraintTypeItemId ), Role::CONSTRAINT_TYPE_ITEM )
121
-				->withDataValueType( 'wikibase-entityid' );
122
-			return new CheckResult( $context, $constraint, CheckResult::STATUS_VIOLATION, $message );
118
+		if (!$dataValue instanceof EntityIdValue) {
119
+			$message = (new ViolationMessage('wbqc-violation-message-value-needed-of-type'))
120
+				->withEntityId(new ItemId($constraintTypeItemId), Role::CONSTRAINT_TYPE_ITEM)
121
+				->withDataValueType('wikibase-entityid');
122
+			return new CheckResult($context, $constraint, CheckResult::STATUS_VIOLATION, $message);
123 123
 		}
124 124
 
125 125
 		$targetEntityId = $dataValue->getEntityId();
126
-		$targetEntity = $this->entityLookup->getEntity( $targetEntityId );
127
-		if ( !$targetEntity instanceof StatementListProvider ) {
128
-			$message = new ViolationMessage( 'wbqc-violation-message-target-entity-must-exist' );
129
-			return new CheckResult( $context, $constraint, CheckResult::STATUS_VIOLATION, $message );
126
+		$targetEntity = $this->entityLookup->getEntity($targetEntityId);
127
+		if (!$targetEntity instanceof StatementListProvider) {
128
+			$message = new ViolationMessage('wbqc-violation-message-target-entity-must-exist');
129
+			return new CheckResult($context, $constraint, CheckResult::STATUS_VIOLATION, $message);
130 130
 		}
131 131
 
132 132
 		$inverseStatement = $this->connectionCheckerHelper->findStatementWithPropertyAndEntityIdValue(
@@ -134,23 +134,23 @@  discard block
 block discarded – undo
134 134
 			$propertyId,
135 135
 			$context->getEntity()->getId()
136 136
 		);
137
-		if ( $inverseStatement !== null ) {
137
+		if ($inverseStatement !== null) {
138 138
 			$message = null;
139 139
 			$status = CheckResult::STATUS_COMPLIANCE;
140 140
 		} else {
141
-			$message = ( new ViolationMessage( 'wbqc-violation-message-inverse' ) )
142
-				->withEntityId( $targetEntityId, Role::SUBJECT )
143
-				->withEntityId( $propertyId, Role::PREDICATE )
144
-				->withEntityId( $context->getEntity()->getId(), Role::OBJECT );
141
+			$message = (new ViolationMessage('wbqc-violation-message-inverse'))
142
+				->withEntityId($targetEntityId, Role::SUBJECT)
143
+				->withEntityId($propertyId, Role::PREDICATE)
144
+				->withEntityId($context->getEntity()->getId(), Role::OBJECT);
145 145
 			$status = CheckResult::STATUS_VIOLATION;
146 146
 		}
147 147
 
148
-		return ( new CheckResult( $context, $constraint, $status, $message ) )
149
-			->withMetadata( Metadata::ofDependencyMetadata(
150
-				DependencyMetadata::ofEntityId( $targetEntityId ) ) );
148
+		return (new CheckResult($context, $constraint, $status, $message))
149
+			->withMetadata(Metadata::ofDependencyMetadata(
150
+				DependencyMetadata::ofEntityId($targetEntityId) ));
151 151
 	}
152 152
 
153
-	public function checkConstraintParameters( Constraint $constraint ): array {
153
+	public function checkConstraintParameters(Constraint $constraint): array {
154 154
 		$constraintParameters = $constraint->getConstraintParameters();
155 155
 		$constraintTypeItemId = $constraint->getConstraintTypeItemId();
156 156
 		$exceptions = [];
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
 				$constraintParameters,
160 160
 				$constraintTypeItemId
161 161
 			);
162
-		} catch ( ConstraintParameterException $e ) {
162
+		} catch (ConstraintParameterException $e) {
163 163
 			$exceptions[] = $e;
164 164
 		}
165 165
 		return $exceptions;
Please login to merge, or discard this patch.
src/ConstraintCheck/Checker/ContemporaryChecker.php 1 patch
Spacing   +42 added lines, -43 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 	 * @codeCoverageIgnore This method is purely declarative.
81 81
 	 */
82 82
 	public function getDefaultContextTypes(): array {
83
-		return [ Context::TYPE_STATEMENT ];
83
+		return [Context::TYPE_STATEMENT];
84 84
 	}
85 85
 
86 86
 	/** @codeCoverageIgnore This method is purely declarative. */
@@ -97,31 +97,31 @@  discard block
 block discarded – undo
97 97
 	 * @return CheckResult
98 98
 	 * @throws ConfigException
99 99
 	 */
100
-	public function checkConstraint( Context $context, Constraint $constraint ): CheckResult {
101
-		if ( $context->getSnakRank() === Statement::RANK_DEPRECATED ) {
102
-			return new CheckResult( $context, $constraint, CheckResult::STATUS_DEPRECATED );
100
+	public function checkConstraint(Context $context, Constraint $constraint): CheckResult {
101
+		if ($context->getSnakRank() === Statement::RANK_DEPRECATED) {
102
+			return new CheckResult($context, $constraint, CheckResult::STATUS_DEPRECATED);
103 103
 		}
104 104
 		$snak = $context->getSnak();
105
-		if ( !$snak instanceof PropertyValueSnak ) {
105
+		if (!$snak instanceof PropertyValueSnak) {
106 106
 			// nothing to check
107
-			return new CheckResult( $context, $constraint, CheckResult::STATUS_COMPLIANCE );
107
+			return new CheckResult($context, $constraint, CheckResult::STATUS_COMPLIANCE);
108 108
 		}
109 109
 
110 110
 		$dataValue = $snak->getDataValue();
111
-		if ( !$dataValue instanceof EntityIdValue ) {
111
+		if (!$dataValue instanceof EntityIdValue) {
112 112
 			// wrong data type
113
-			$message = ( new ViolationMessage( 'wbqc-violation-message-value-needed-of-type' ) )
114
-				->withEntityId( new ItemId( $constraint->getConstraintTypeItemId() ), Role::CONSTRAINT_TYPE_ITEM )
115
-				->withDataValueType( 'wikibase-entityid' );
116
-			return new CheckResult( $context, $constraint, CheckResult::STATUS_VIOLATION, $message );
113
+			$message = (new ViolationMessage('wbqc-violation-message-value-needed-of-type'))
114
+				->withEntityId(new ItemId($constraint->getConstraintTypeItemId()), Role::CONSTRAINT_TYPE_ITEM)
115
+				->withDataValueType('wikibase-entityid');
116
+			return new CheckResult($context, $constraint, CheckResult::STATUS_VIOLATION, $message);
117 117
 		}
118 118
 
119 119
 		$objectId = $dataValue->getEntityId();
120
-		$objectItem = $this->entityLookup->getEntity( $objectId );
121
-		if ( !( $objectItem instanceof StatementListProvider ) ) {
120
+		$objectItem = $this->entityLookup->getEntity($objectId);
121
+		if (!($objectItem instanceof StatementListProvider)) {
122 122
 			// object was deleted/doesn't exist
123
-			$message = new ViolationMessage( 'wbqc-violation-message-value-entity-must-exist' );
124
-			return new CheckResult( $context, $constraint, CheckResult::STATUS_VIOLATION, $message );
123
+			$message = new ViolationMessage('wbqc-violation-message-value-entity-must-exist');
124
+			return new CheckResult($context, $constraint, CheckResult::STATUS_VIOLATION, $message);
125 125
 		}
126 126
 		/** @var Statement[] $objectStatements */
127 127
 		$objectStatements = $objectItem->getStatements()->toArray();
@@ -129,9 +129,9 @@  discard block
 block discarded – undo
129 129
 		$subjectId = $context->getEntity()->getId();
130 130
 		$subjectStatements = $context->getEntity()->getStatements()->toArray();
131 131
 		/** @var String[] $startPropertyIds */
132
-		$startPropertyIds = $this->config->get( self::CONFIG_VARIABLE_START_PROPERTY_IDS );
132
+		$startPropertyIds = $this->config->get(self::CONFIG_VARIABLE_START_PROPERTY_IDS);
133 133
 		/** @var String[] $endPropertyIds */
134
-		$endPropertyIds = $this->config->get( self::CONFIG_VARIABLE_END_PROPERTY_IDS );
134
+		$endPropertyIds = $this->config->get(self::CONFIG_VARIABLE_END_PROPERTY_IDS);
135 135
 		$subjectStartValue = $this->getExtremeValue(
136 136
 			$startPropertyIds,
137 137
 			$subjectStatements,
@@ -153,15 +153,15 @@  discard block
 block discarded – undo
153 153
 			'end'
154 154
 		);
155 155
 		if (
156
-			$this->rangeCheckerHelper->getComparison( $subjectStartValue, $subjectEndValue ) <= 0 &&
157
-			$this->rangeCheckerHelper->getComparison( $objectStartValue, $objectEndValue ) <= 0 && (
158
-				$this->rangeCheckerHelper->getComparison( $subjectEndValue, $objectStartValue ) < 0 ||
159
-				$this->rangeCheckerHelper->getComparison( $objectEndValue, $subjectStartValue ) < 0
156
+			$this->rangeCheckerHelper->getComparison($subjectStartValue, $subjectEndValue) <= 0 &&
157
+			$this->rangeCheckerHelper->getComparison($objectStartValue, $objectEndValue) <= 0 && (
158
+				$this->rangeCheckerHelper->getComparison($subjectEndValue, $objectStartValue) < 0 ||
159
+				$this->rangeCheckerHelper->getComparison($objectEndValue, $subjectStartValue) < 0
160 160
 			)
161 161
 		) {
162 162
 			if (
163 163
 				$subjectEndValue == null ||
164
-				$this->rangeCheckerHelper->getComparison( $objectEndValue, $subjectEndValue ) < 0
164
+				$this->rangeCheckerHelper->getComparison($objectEndValue, $subjectEndValue) < 0
165 165
 			) {
166 166
 				$earlierEntityId = $objectId;
167 167
 				$minEndValue = $objectEndValue;
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
 			$message = null;
187 187
 			$status = CheckResult::STATUS_COMPLIANCE;
188 188
 		}
189
-		return new CheckResult( $context, $constraint, $status, $message );
189
+		return new CheckResult($context, $constraint, $status, $message);
190 190
 	}
191 191
 
192 192
 	/**
@@ -196,19 +196,19 @@  discard block
 block discarded – undo
196 196
 	 *
197 197
 	 * @return DataValue|null
198 198
 	 */
199
-	private function getExtremeValue( $extremePropertyIds, $statements, $startOrEnd ) {
200
-		if ( $startOrEnd !== 'start' && $startOrEnd !== 'end' ) {
201
-			throw new \InvalidArgumentException( '$startOrEnd must be \'start\' or \'end\'.' );
199
+	private function getExtremeValue($extremePropertyIds, $statements, $startOrEnd) {
200
+		if ($startOrEnd !== 'start' && $startOrEnd !== 'end') {
201
+			throw new \InvalidArgumentException('$startOrEnd must be \'start\' or \'end\'.');
202 202
 		}
203 203
 		$extremeValue = null;
204
-		foreach ( $extremePropertyIds as $extremePropertyId ) {
205
-			$statementList = new StatementList( ...$statements );
206
-			$extremeStatements = $statementList->getByPropertyId( new NumericPropertyId( $extremePropertyId ) );
204
+		foreach ($extremePropertyIds as $extremePropertyId) {
205
+			$statementList = new StatementList(...$statements);
206
+			$extremeStatements = $statementList->getByPropertyId(new NumericPropertyId($extremePropertyId));
207 207
 			/** @var Statement $extremeStatement */
208
-			foreach ( $extremeStatements as $extremeStatement ) {
209
-				if ( $extremeStatement->getRank() !== Statement::RANK_DEPRECATED ) {
208
+			foreach ($extremeStatements as $extremeStatement) {
209
+				if ($extremeStatement->getRank() !== Statement::RANK_DEPRECATED) {
210 210
 					$snak = $extremeStatement->getMainSnak();
211
-					if ( !$snak instanceof PropertyValueSnak ) {
211
+					if (!$snak instanceof PropertyValueSnak) {
212 212
 						return null;
213 213
 					} else {
214 214
 						$comparison = $this->rangeCheckerHelper->getComparison(
@@ -217,8 +217,8 @@  discard block
 block discarded – undo
217 217
 						);
218 218
 						if (
219 219
 							$extremeValue === null ||
220
-							( $startOrEnd === 'start' && $comparison < 0 ) ||
221
-							( $startOrEnd === 'end' && $comparison > 0 )
220
+							($startOrEnd === 'start' && $comparison < 0) ||
221
+							($startOrEnd === 'end' && $comparison > 0)
222 222
 						) {
223 223
 							$extremeValue = $snak->getDataValue();
224 224
 						}
@@ -248,17 +248,16 @@  discard block
 block discarded – undo
248 248
 		DataValue $maxStartValue
249 249
 	) {
250 250
 		$messageKey = $earlierEntityId === $subjectId ?
251
-			'wbqc-violation-message-contemporary-subject-earlier' :
252
-			'wbqc-violation-message-contemporary-value-earlier';
253
-		return ( new ViolationMessage( $messageKey ) )
254
-			->withEntityId( $subjectId, Role::SUBJECT )
255
-			->withEntityId( $propertyId, Role::PREDICATE )
256
-			->withEntityId( $objectId, Role::OBJECT )
257
-			->withDataValue( $minEndValue, Role::OBJECT )
258
-			->withDataValue( $maxStartValue, Role::OBJECT );
251
+			'wbqc-violation-message-contemporary-subject-earlier' : 'wbqc-violation-message-contemporary-value-earlier';
252
+		return (new ViolationMessage($messageKey))
253
+			->withEntityId($subjectId, Role::SUBJECT)
254
+			->withEntityId($propertyId, Role::PREDICATE)
255
+			->withEntityId($objectId, Role::OBJECT)
256
+			->withDataValue($minEndValue, Role::OBJECT)
257
+			->withDataValue($maxStartValue, Role::OBJECT);
259 258
 	}
260 259
 
261
-	public function checkConstraintParameters( Constraint $constraint ): array {
260
+	public function checkConstraintParameters(Constraint $constraint): array {
262 261
 		// no parameters
263 262
 		return [];
264 263
 	}
Please login to merge, or discard this patch.
src/ConstraintRepositoryLookup.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 	 * @param string|false $dbName Database name ($domain for ILoadBalancer methods).
30 30
 	 * @param LoggerInterface|null $logger
31 31
 	 */
32
-	public function __construct( ILoadBalancer $lb, $dbName, ?LoggerInterface $logger = null ) {
32
+	public function __construct(ILoadBalancer $lb, $dbName, ?LoggerInterface $logger = null) {
33 33
 		$this->lb = $lb;
34 34
 		$this->dbName = $dbName;
35 35
 		$this->logger = $logger ?? new NullLogger();
@@ -40,22 +40,22 @@  discard block
 block discarded – undo
40 40
 	 *
41 41
 	 * @return Constraint[]
42 42
 	 */
43
-	public function queryConstraintsForProperty( NumericPropertyId $propertyId ) {
44
-		$dbr = $this->lb->getConnection( ILoadBalancer::DB_REPLICA, [], $this->dbName );
43
+	public function queryConstraintsForProperty(NumericPropertyId $propertyId) {
44
+		$dbr = $this->lb->getConnection(ILoadBalancer::DB_REPLICA, [], $this->dbName);
45 45
 
46 46
 		$results = $dbr->newSelectQueryBuilder()
47
-			->select( [
47
+			->select([
48 48
 				'constraint_type_qid',
49 49
 				'constraint_parameters',
50 50
 				'constraint_guid',
51 51
 				'pid',
52
-			] )
53
-			->from( 'wbqc_constraints' )
54
-			->where( [ 'pid' => $propertyId->getNumericId() ] )
55
-			->caller( __METHOD__ )
52
+			])
53
+			->from('wbqc_constraints')
54
+			->where(['pid' => $propertyId->getNumericId()])
55
+			->caller(__METHOD__)
56 56
 			->fetchResultSet();
57 57
 
58
-		return $this->convertToConstraints( $results );
58
+		return $this->convertToConstraints($results);
59 59
 	}
60 60
 
61 61
 	/**
@@ -63,25 +63,25 @@  discard block
 block discarded – undo
63 63
 	 *
64 64
 	 * @return Constraint[]
65 65
 	 */
66
-	private function convertToConstraints( IResultWrapper $results ) {
66
+	private function convertToConstraints(IResultWrapper $results) {
67 67
 		$constraints = [];
68
-		foreach ( $results as $result ) {
68
+		foreach ($results as $result) {
69 69
 			$constraintTypeItemId = $result->constraint_type_qid;
70
-			$constraintParameters = json_decode( $result->constraint_parameters, true );
70
+			$constraintParameters = json_decode($result->constraint_parameters, true);
71 71
 
72
-			if ( $constraintParameters === null ) {
72
+			if ($constraintParameters === null) {
73 73
 				// T171295
74
-				$this->logger->warning( 'Constraint {constraintId} has invalid constraint parameters.', [
74
+				$this->logger->warning('Constraint {constraintId} has invalid constraint parameters.', [
75 75
 					'method' => __METHOD__,
76 76
 					'constraintId' => $result->constraint_guid,
77 77
 					'constraintParameters' => $result->constraint_parameters,
78
-				] );
79
-				$constraintParameters = [ '@error' => [ /* unknown */ ] ];
78
+				]);
79
+				$constraintParameters = ['@error' => [/* unknown */]];
80 80
 			}
81 81
 
82 82
 			$constraints[] = new Constraint(
83 83
 				$result->constraint_guid,
84
-				NumericPropertyId::newFromNumber( $result->pid ),
84
+				NumericPropertyId::newFromNumber($result->pid),
85 85
 				$constraintTypeItemId,
86 86
 				$constraintParameters
87 87
 			);
Please login to merge, or discard this patch.
src/WikibaseServices.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare( strict_types = 1 );
3
+declare(strict_types=1);
4 4
 
5 5
 namespace WikibaseQuality\ConstraintReport;
6 6
 
@@ -26,9 +26,9 @@  discard block
 block discarded – undo
26 26
 	public const ENTITY_LOOKUP_WITHOUT_CACHE = 'WBQC_EntityLookupWithoutCache';
27 27
 
28 28
 	/** @return mixed */
29
-	private static function getService( ?MediaWikiServices $services, string $name ) {
29
+	private static function getService(?MediaWikiServices $services, string $name) {
30 30
 		$services ??= MediaWikiServices::getInstance();
31
-		return $services->getService( $name );
31
+		return $services->getService($name);
32 32
 	}
33 33
 
34 34
 	/**
@@ -38,8 +38,8 @@  discard block
 block discarded – undo
38 38
 	 * this lookup ignores exceptions (such as unresolved redirects, T93273),
39 39
 	 * as it is more convenient to treat them all as missing entities in WBQC.
40 40
 	 */
41
-	public static function getEntityLookup( ?MediaWikiServices $services = null ): EntityLookup {
42
-		return self::getService( $services, self::ENTITY_LOOKUP );
41
+	public static function getEntityLookup(?MediaWikiServices $services = null): EntityLookup {
42
+		return self::getService($services, self::ENTITY_LOOKUP);
43 43
 	}
44 44
 
45 45
 	/**
@@ -49,8 +49,8 @@  discard block
 block discarded – undo
49 49
 	 * were exceeding the request memory limit when they were all added to the cache (T227450).
50 50
 	 * Also, like {@link self::getEntityLookup()}, this lookup ignores exceptions.
51 51
 	 */
52
-	public static function getEntityLookupWithoutCache( ?MediaWikiServices $services = null ): EntityLookup {
53
-		return self::getService( $services, self::ENTITY_LOOKUP_WITHOUT_CACHE );
52
+	public static function getEntityLookupWithoutCache(?MediaWikiServices $services = null): EntityLookup {
53
+		return self::getService($services, self::ENTITY_LOOKUP_WITHOUT_CACHE);
54 54
 	}
55 55
 
56 56
 }
Please login to merge, or discard this patch.
src/ConstraintCheckerServices.php 1 patch
Spacing   +64 added lines, -64 removed lines patch added patch discarded remove patch
@@ -45,257 +45,257 @@
 block discarded – undo
45 45
 	public const LABEL_IN_LANGUAGE_CHECKER = 'WBQC_LabelInLanguageChecker';
46 46
 
47 47
 	/** @return mixed */
48
-	private static function getService( ?MediaWikiServices $services, string $name ) {
48
+	private static function getService(?MediaWikiServices $services, string $name) {
49 49
 		$services ??= MediaWikiServices::getInstance();
50
-		return $services->getService( $name );
50
+		return $services->getService($name);
51 51
 	}
52 52
 
53 53
 	/**
54 54
 	 * @param MediaWikiServices|null $services
55 55
 	 * @return ConstraintChecker
56 56
 	 */
57
-	public static function getConflictsWithChecker( ?MediaWikiServices $services = null ) {
58
-		return self::getService( $services, self::CONFLICTS_WITH_CHECKER );
57
+	public static function getConflictsWithChecker(?MediaWikiServices $services = null) {
58
+		return self::getService($services, self::CONFLICTS_WITH_CHECKER);
59 59
 	}
60 60
 
61 61
 	/**
62 62
 	 * @param MediaWikiServices|null $services
63 63
 	 * @return ConstraintChecker
64 64
 	 */
65
-	public static function getItemChecker( ?MediaWikiServices $services = null ) {
66
-		return self::getService( $services, self::ITEM_CHECKER );
65
+	public static function getItemChecker(?MediaWikiServices $services = null) {
66
+		return self::getService($services, self::ITEM_CHECKER);
67 67
 	}
68 68
 
69 69
 	/**
70 70
 	 * @param MediaWikiServices|null $services
71 71
 	 * @return ConstraintChecker
72 72
 	 */
73
-	public static function getTargetRequiredClaimChecker( ?MediaWikiServices $services = null ) {
74
-		return self::getService( $services, self::TARGET_REQUIRED_CLAIM_CHECKER );
73
+	public static function getTargetRequiredClaimChecker(?MediaWikiServices $services = null) {
74
+		return self::getService($services, self::TARGET_REQUIRED_CLAIM_CHECKER);
75 75
 	}
76 76
 
77 77
 	/**
78 78
 	 * @param MediaWikiServices|null $services
79 79
 	 * @return ConstraintChecker
80 80
 	 */
81
-	public static function getSymmetricChecker( ?MediaWikiServices $services = null ) {
82
-		return self::getService( $services, self::SYMMETRIC_CHECKER );
81
+	public static function getSymmetricChecker(?MediaWikiServices $services = null) {
82
+		return self::getService($services, self::SYMMETRIC_CHECKER);
83 83
 	}
84 84
 
85 85
 	/**
86 86
 	 * @param MediaWikiServices|null $services
87 87
 	 * @return ConstraintChecker
88 88
 	 */
89
-	public static function getInverseChecker( ?MediaWikiServices $services = null ) {
90
-		return self::getService( $services, self::INVERSE_CHECKER );
89
+	public static function getInverseChecker(?MediaWikiServices $services = null) {
90
+		return self::getService($services, self::INVERSE_CHECKER);
91 91
 	}
92 92
 
93 93
 	/**
94 94
 	 * @param MediaWikiServices|null $services
95 95
 	 * @return ConstraintChecker
96 96
 	 */
97
-	public static function getQualifierChecker( ?MediaWikiServices $services = null ) {
98
-		return self::getService( $services, self::QUALIFIER_CHECKER );
97
+	public static function getQualifierChecker(?MediaWikiServices $services = null) {
98
+		return self::getService($services, self::QUALIFIER_CHECKER);
99 99
 	}
100 100
 
101 101
 	/**
102 102
 	 * @param MediaWikiServices|null $services
103 103
 	 * @return ConstraintChecker
104 104
 	 */
105
-	public static function getQualifiersChecker( ?MediaWikiServices $services = null ) {
106
-		return self::getService( $services, self::QUALIFIERS_CHECKER );
105
+	public static function getQualifiersChecker(?MediaWikiServices $services = null) {
106
+		return self::getService($services, self::QUALIFIERS_CHECKER);
107 107
 	}
108 108
 
109 109
 	/**
110 110
 	 * @param MediaWikiServices|null $services
111 111
 	 * @return ConstraintChecker
112 112
 	 */
113
-	public static function getMandatoryQualifiersChecker( ?MediaWikiServices $services = null ) {
114
-		return self::getService( $services, self::MANDATORY_QUALIFIERS_CHECKER );
113
+	public static function getMandatoryQualifiersChecker(?MediaWikiServices $services = null) {
114
+		return self::getService($services, self::MANDATORY_QUALIFIERS_CHECKER);
115 115
 	}
116 116
 
117 117
 	/**
118 118
 	 * @param MediaWikiServices|null $services
119 119
 	 * @return ConstraintChecker
120 120
 	 */
121
-	public static function getRangeChecker( ?MediaWikiServices $services = null ) {
122
-		return self::getService( $services, self::RANGE_CHECKER );
121
+	public static function getRangeChecker(?MediaWikiServices $services = null) {
122
+		return self::getService($services, self::RANGE_CHECKER);
123 123
 	}
124 124
 
125 125
 	/**
126 126
 	 * @param MediaWikiServices|null $services
127 127
 	 * @return ConstraintChecker
128 128
 	 */
129
-	public static function getDiffWithinRangeChecker( ?MediaWikiServices $services = null ) {
130
-		return self::getService( $services, self::DIFF_WITHIN_RANGE_CHECKER );
129
+	public static function getDiffWithinRangeChecker(?MediaWikiServices $services = null) {
130
+		return self::getService($services, self::DIFF_WITHIN_RANGE_CHECKER);
131 131
 	}
132 132
 
133 133
 	/**
134 134
 	 * @param MediaWikiServices|null $services
135 135
 	 * @return ConstraintChecker
136 136
 	 */
137
-	public static function getTypeChecker( ?MediaWikiServices $services = null ) {
138
-		return self::getService( $services, self::TYPE_CHECKER );
137
+	public static function getTypeChecker(?MediaWikiServices $services = null) {
138
+		return self::getService($services, self::TYPE_CHECKER);
139 139
 	}
140 140
 
141 141
 	/**
142 142
 	 * @param MediaWikiServices|null $services
143 143
 	 * @return ConstraintChecker
144 144
 	 */
145
-	public static function getValueTypeChecker( ?MediaWikiServices $services = null ) {
146
-		return self::getService( $services, self::VALUE_TYPE_CHECKER );
145
+	public static function getValueTypeChecker(?MediaWikiServices $services = null) {
146
+		return self::getService($services, self::VALUE_TYPE_CHECKER);
147 147
 	}
148 148
 
149 149
 	/**
150 150
 	 * @param MediaWikiServices|null $services
151 151
 	 * @return ConstraintChecker
152 152
 	 */
153
-	public static function getSingleValueChecker( ?MediaWikiServices $services = null ) {
154
-		return self::getService( $services, self::SINGLE_VALUE_CHECKER );
153
+	public static function getSingleValueChecker(?MediaWikiServices $services = null) {
154
+		return self::getService($services, self::SINGLE_VALUE_CHECKER);
155 155
 	}
156 156
 
157 157
 	/**
158 158
 	 * @param MediaWikiServices|null $services
159 159
 	 * @return ConstraintChecker
160 160
 	 */
161
-	public static function getMultiValueChecker( ?MediaWikiServices $services = null ) {
162
-		return self::getService( $services, self::MULTI_VALUE_CHECKER );
161
+	public static function getMultiValueChecker(?MediaWikiServices $services = null) {
162
+		return self::getService($services, self::MULTI_VALUE_CHECKER);
163 163
 	}
164 164
 
165 165
 	/**
166 166
 	 * @param MediaWikiServices|null $services
167 167
 	 * @return ConstraintChecker
168 168
 	 */
169
-	public static function getUniqueValueChecker( ?MediaWikiServices $services = null ) {
170
-		return self::getService( $services, self::UNIQUE_VALUE_CHECKER );
169
+	public static function getUniqueValueChecker(?MediaWikiServices $services = null) {
170
+		return self::getService($services, self::UNIQUE_VALUE_CHECKER);
171 171
 	}
172 172
 
173 173
 	/**
174 174
 	 * @param MediaWikiServices|null $services
175 175
 	 * @return ConstraintChecker
176 176
 	 */
177
-	public static function getFormatChecker( ?MediaWikiServices $services = null ) {
178
-		return self::getService( $services, self::FORMAT_CHECKER );
177
+	public static function getFormatChecker(?MediaWikiServices $services = null) {
178
+		return self::getService($services, self::FORMAT_CHECKER);
179 179
 	}
180 180
 
181 181
 	/**
182 182
 	 * @param MediaWikiServices|null $services
183 183
 	 * @return ConstraintChecker
184 184
 	 */
185
-	public static function getCommonsLinkChecker( ?MediaWikiServices $services = null ) {
186
-		return self::getService( $services, self::COMMONS_LINK_CHECKER );
185
+	public static function getCommonsLinkChecker(?MediaWikiServices $services = null) {
186
+		return self::getService($services, self::COMMONS_LINK_CHECKER);
187 187
 	}
188 188
 
189 189
 	/**
190 190
 	 * @param MediaWikiServices|null $services
191 191
 	 * @return ConstraintChecker
192 192
 	 */
193
-	public static function getOneOfChecker( ?MediaWikiServices $services = null ) {
194
-		return self::getService( $services, self::ONE_OF_CHECKER );
193
+	public static function getOneOfChecker(?MediaWikiServices $services = null) {
194
+		return self::getService($services, self::ONE_OF_CHECKER);
195 195
 	}
196 196
 
197 197
 	/**
198 198
 	 * @param MediaWikiServices|null $services
199 199
 	 * @return ConstraintChecker
200 200
 	 */
201
-	public static function getValueOnlyChecker( ?MediaWikiServices $services = null ) {
202
-		return self::getService( $services, self::VALUE_ONLY_CHECKER );
201
+	public static function getValueOnlyChecker(?MediaWikiServices $services = null) {
202
+		return self::getService($services, self::VALUE_ONLY_CHECKER);
203 203
 	}
204 204
 
205 205
 	/**
206 206
 	 * @param MediaWikiServices|null $services
207 207
 	 * @return ConstraintChecker
208 208
 	 */
209
-	public static function getReferenceChecker( ?MediaWikiServices $services = null ) {
210
-		return self::getService( $services, self::REFERENCE_CHECKER );
209
+	public static function getReferenceChecker(?MediaWikiServices $services = null) {
210
+		return self::getService($services, self::REFERENCE_CHECKER);
211 211
 	}
212 212
 
213 213
 	/**
214 214
 	 * @param MediaWikiServices|null $services
215 215
 	 * @return ConstraintChecker
216 216
 	 */
217
-	public static function getNoBoundsChecker( ?MediaWikiServices $services = null ) {
218
-		return self::getService( $services, self::NO_BOUNDS_CHECKER );
217
+	public static function getNoBoundsChecker(?MediaWikiServices $services = null) {
218
+		return self::getService($services, self::NO_BOUNDS_CHECKER);
219 219
 	}
220 220
 
221 221
 	/**
222 222
 	 * @param MediaWikiServices|null $services
223 223
 	 * @return ConstraintChecker
224 224
 	 */
225
-	public static function getAllowedUnitsChecker( ?MediaWikiServices $services = null ) {
226
-		return self::getService( $services, self::ALLOWED_UNITS_CHECKER );
225
+	public static function getAllowedUnitsChecker(?MediaWikiServices $services = null) {
226
+		return self::getService($services, self::ALLOWED_UNITS_CHECKER);
227 227
 	}
228 228
 
229 229
 	/**
230 230
 	 * @param MediaWikiServices|null $services
231 231
 	 * @return ConstraintChecker
232 232
 	 */
233
-	public static function getSingleBestValueChecker( ?MediaWikiServices $services = null ) {
234
-		return self::getService( $services, self::SINGLE_BEST_VALUE_CHECKER );
233
+	public static function getSingleBestValueChecker(?MediaWikiServices $services = null) {
234
+		return self::getService($services, self::SINGLE_BEST_VALUE_CHECKER);
235 235
 	}
236 236
 
237 237
 	/**
238 238
 	 * @param MediaWikiServices|null $services
239 239
 	 * @return ConstraintChecker
240 240
 	 */
241
-	public static function getEntityTypeChecker( ?MediaWikiServices $services = null ) {
242
-		return self::getService( $services, self::ENTITY_TYPE_CHECKER );
241
+	public static function getEntityTypeChecker(?MediaWikiServices $services = null) {
242
+		return self::getService($services, self::ENTITY_TYPE_CHECKER);
243 243
 	}
244 244
 
245 245
 	/**
246 246
 	 * @param MediaWikiServices|null $services
247 247
 	 * @return ConstraintChecker
248 248
 	 */
249
-	public static function getNoneOfChecker( ?MediaWikiServices $services = null ) {
250
-		return self::getService( $services, self::NONE_OF_CHECKER );
249
+	public static function getNoneOfChecker(?MediaWikiServices $services = null) {
250
+		return self::getService($services, self::NONE_OF_CHECKER);
251 251
 	}
252 252
 
253 253
 	/**
254 254
 	 * @param MediaWikiServices|null $services
255 255
 	 * @return ConstraintChecker
256 256
 	 */
257
-	public static function getIntegerChecker( ?MediaWikiServices $services = null ) {
258
-		return self::getService( $services, self::INTEGER_CHECKER );
257
+	public static function getIntegerChecker(?MediaWikiServices $services = null) {
258
+		return self::getService($services, self::INTEGER_CHECKER);
259 259
 	}
260 260
 
261 261
 	/**
262 262
 	 * @param MediaWikiServices|null $services
263 263
 	 * @return ConstraintChecker
264 264
 	 */
265
-	public static function getCitationNeededChecker( ?MediaWikiServices $services = null ) {
266
-		return self::getService( $services, self::CITATION_NEEDED_CHECKER );
265
+	public static function getCitationNeededChecker(?MediaWikiServices $services = null) {
266
+		return self::getService($services, self::CITATION_NEEDED_CHECKER);
267 267
 	}
268 268
 
269 269
 	/**
270 270
 	 * @param MediaWikiServices|null $services
271 271
 	 * @return ConstraintChecker
272 272
 	 */
273
-	public static function getPropertyScopeChecker( ?MediaWikiServices $services = null ) {
274
-		return self::getService( $services, self::PROPERTY_SCOPE_CHECKER );
273
+	public static function getPropertyScopeChecker(?MediaWikiServices $services = null) {
274
+		return self::getService($services, self::PROPERTY_SCOPE_CHECKER);
275 275
 	}
276 276
 
277 277
 	/**
278 278
 	 * @param MediaWikiServices|null $services
279 279
 	 * @return ConstraintChecker
280 280
 	 */
281
-	public static function getContemporaryChecker( ?MediaWikiServices $services = null ) {
282
-		return self::getService( $services, self::CONTEMPORARY_CHECKER );
281
+	public static function getContemporaryChecker(?MediaWikiServices $services = null) {
282
+		return self::getService($services, self::CONTEMPORARY_CHECKER);
283 283
 	}
284 284
 
285 285
 	/**
286 286
 	 * @param MediaWikiServices|null $services
287 287
 	 * @return LanguageChecker
288 288
 	 */
289
-	public static function getLexemeLanguageChecker( ?MediaWikiServices $services = null ) {
290
-		return self::getService( $services, self::LEXEME_LANGUAGE_CHECKER );
289
+	public static function getLexemeLanguageChecker(?MediaWikiServices $services = null) {
290
+		return self::getService($services, self::LEXEME_LANGUAGE_CHECKER);
291 291
 	}
292 292
 
293 293
 	/**
294 294
 	 * @param MediaWikiServices|null $services
295 295
 	 * @return LabelInLanguageChecker
296 296
 	 */
297
-	public static function getLabelInLanguageChecker( ?MediaWikiServices $services = null ) {
298
-		return self::getService( $services, self::LABEL_IN_LANGUAGE_CHECKER );
297
+	public static function getLabelInLanguageChecker(?MediaWikiServices $services = null) {
298
+		return self::getService($services, self::LABEL_IN_LANGUAGE_CHECKER);
299 299
 	}
300 300
 
301 301
 }
Please login to merge, or discard this patch.