Skip to content

Commit 98a9a1b

Browse files
author
libraryupgrader
committed
build: Updating mediawiki/mediawiki-codesniffer to 37.0.0
Change-Id: Iae8caf3500a49001fe2727fd0c1ef62b378c7093
1 parent 414cf0b commit 98a9a1b

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"php": ">=7.2.9"
2828
},
2929
"require-dev": {
30-
"mediawiki/mediawiki-codesniffer": "36.0.0",
30+
"mediawiki/mediawiki-codesniffer": "37.0.0",
3131
"mediawiki/mediawiki-phan-config": "0.10.6",
3232
"mediawiki/minus-x": "1.1.1",
3333
"ockcyp/covers-validator": "1.3.3",

src/Converter.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ class Converter {
9999
* @param string $rule The rule to convert
100100
* @return string The RPN representation of the rule
101101
*/
102-
public static function convert( $rule ) : string {
102+
public static function convert( $rule ): string {
103103
$parser = new self( $rule );
104104

105105
return $parser->doConvert();
@@ -120,7 +120,7 @@ protected function __construct( string $rule ) {
120120
*
121121
* @return string The RPN representation of the rule (e.g. "5 3 mod n is")
122122
*/
123-
protected function doConvert() : string {
123+
protected function doConvert(): string {
124124
$expectOperator = true;
125125

126126
// Iterate through all tokens, saving the operators and operands to a
@@ -308,7 +308,7 @@ protected function doOperation( Operator $op ) {
308308
* @param int $pos
309309
* @return Expression The numerical expression
310310
*/
311-
protected function newNumber( string $text, int $pos ) : Expression {
311+
protected function newNumber( string $text, int $pos ): Expression {
312312
return new Expression( $this, 'number', $text, $pos, strlen( $text ) );
313313
}
314314

@@ -320,7 +320,7 @@ protected function newNumber( string $text, int $pos ) : Expression {
320320
* @param int $length
321321
* @return Operator The operator
322322
*/
323-
protected function newOperator( string $type, int $pos, int $length ) : Operator {
323+
protected function newOperator( string $type, int $pos, int $length ): Operator {
324324
return new Operator( $this, $type, $pos, $length );
325325
}
326326

src/Converter/Expression.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function __construct( Converter $parser, $type, $rpn, $pos, $length ) {
3939
* @param string $type
4040
* @return bool
4141
*/
42-
public function isType( $type ) : bool {
42+
public function isType( $type ): bool {
4343
if ( $type === 'range' && ( $this->type === 'range' || $this->type === 'number' ) ) {
4444
return true;
4545
}

src/Converter/Operator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public function __construct( Converter $parser, $name, $pos, $length ) {
8888
* @param Expression $right The right part of the expression
8989
* @return Expression The result of the operation
9090
*/
91-
public function operate( Expression $left, Expression $right ) : Expression {
91+
public function operate( Expression $left, Expression $right ): Expression {
9292
$typeSpec = self::OP_TYPES[$this->name];
9393

9494
$leftType = self::TYPE_SPEC_MAP[$typeSpec[0]];

src/Evaluator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public static function evaluate( $number, array $rules ) {
3636
* @param array $rules The rules to compile
3737
* @return array An array of compile rules.
3838
*/
39-
public static function compile( array $rules ) : array {
39+
public static function compile( array $rules ): array {
4040
// We can't use array_map() for this because it generates a warning if
4141
// there is an exception.
4242
foreach ( $rules as &$rule ) {
@@ -55,7 +55,7 @@ public static function compile( array $rules ) : array {
5555
* @param array $rules The associative array of plural rules in pluralform => rule format.
5656
* @return int The index of the plural form which passed the evaluation
5757
*/
58-
public static function evaluateCompiled( $number, array $rules ) : int {
58+
public static function evaluateCompiled( $number, array $rules ): int {
5959
// Calculate the values of the operand symbols
6060
$number = strval( $number );
6161
if ( !preg_match( '/^ -? ( ([0-9]+) (?: \. ([0-9]+) )? )$/x', $number, $m ) ) {

src/Range.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function __construct( $start, $end = false ) {
4141
* otherwise, number simply has to be inside the range.
4242
* @return bool True if the number is inside the range; otherwise, false.
4343
*/
44-
public function isNumberIn( $number, $integerConstraint = true ) : bool {
44+
public function isNumberIn( $number, $integerConstraint = true ): bool {
4545
foreach ( $this->parts as $part ) {
4646
if ( is_array( $part ) ) {
4747
if ( ( !$integerConstraint || floor( $number ) === (float)$number )
@@ -66,7 +66,7 @@ public function isNumberIn( $number, $integerConstraint = true ) : bool {
6666
* @param int $number The number to check
6767
* @return bool True if the number is inside the range; otherwise, false.
6868
*/
69-
public function isNumberWithin( $number ) : bool {
69+
public function isNumberWithin( $number ): bool {
7070
return $this->isNumberIn( $number, false );
7171
}
7272

0 commit comments

Comments
 (0)