-
Notifications
You must be signed in to change notification settings - Fork 6
Upgrade mediawiki-codesniffer to latest version (45.0.0) #63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
JeroenDeDauw
merged 1 commit into
DataValues:master
from
codders:feat/upgrade-mediawiki-codesniffer-20241206
Dec 6, 2024
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,8 +13,6 @@ jobs: | |
| fail-fast: false | ||
| matrix: | ||
| php: | ||
| - '7.2' | ||
| - '7.3' | ||
| - '7.4' | ||
| - '8.0' | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,7 +9,7 @@ | |
| use RuntimeException; | ||
|
|
||
| /** | ||
| * @license GPL-2.0+ | ||
| * @license GPL-2.0-or-later | ||
| * @author Jeroen De Dauw < [email protected] > | ||
| */ | ||
| final class FormatterOptions { | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,7 +7,7 @@ | |
| use RuntimeException; | ||
|
|
||
| /** | ||
| * @license GPL-2.0+ | ||
| * @license GPL-2.0-or-later | ||
| * @author Jeroen De Dauw < [email protected] > | ||
| */ | ||
| class FormattingException extends RuntimeException { | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,7 +8,7 @@ | |
| * Interface for value formatters, typically (but not limited to) expecting a DataValue object and | ||
| * returning a string. | ||
| * | ||
| * @license GPL-2.0+ | ||
| * @license GPL-2.0-or-later | ||
| * @author Jeroen De Dauw < [email protected] > | ||
| */ | ||
| interface ValueFormatter { | ||
|
|
@@ -17,7 +17,7 @@ interface ValueFormatter { | |
| * Identifier for the option that holds the code of the language in which the formatter should | ||
| * operate. | ||
| */ | ||
| const OPT_LANG = 'lang'; | ||
| public const OPT_LANG = 'lang'; | ||
|
|
||
| /** | ||
| * @param mixed $value | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,7 +7,7 @@ | |
| use RuntimeException; | ||
|
|
||
| /** | ||
| * @license GPL-2.0+ | ||
| * @license GPL-2.0-or-later | ||
| * @author Jeroen De Dauw < [email protected] > | ||
| */ | ||
| class ParseException extends RuntimeException { | ||
|
|
@@ -23,11 +23,11 @@ class ParseException extends RuntimeException { | |
| private $rawValue; | ||
|
|
||
| /** | ||
| * @param string $message A plain english message describing the error | ||
| * @param string $message A plain english message describing the error | ||
| * @param string|null $rawValue The raw value that failed to be parsed. | ||
| * @param string|null $expectedFormat An identifier for the format the raw value did not match | ||
| */ | ||
| public function __construct( string $message, string $rawValue = null, string $expectedFormat = null ) { | ||
| public function __construct( string $message, ?string $rawValue = null, ?string $expectedFormat = null ) { | ||
| parent::__construct( $message ); | ||
| $this->expectedFormat = $expectedFormat; | ||
| $this->rawValue = $rawValue; | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,7 +8,7 @@ | |
| use RuntimeException; | ||
|
|
||
| /** | ||
| * @license GPL-2.0+ | ||
| * @license GPL-2.0-or-later | ||
| * @author Jeroen De Dauw < [email protected] > | ||
| */ | ||
| final class ParserOptions { | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,7 +8,7 @@ | |
| * Interface for value parsers, typically (but not limited to) expecting a string and returning a | ||
| * DataValue object. | ||
| * | ||
| * @license GPL-2.0+ | ||
| * @license GPL-2.0-or-later | ||
| * @author Jeroen De Dauw < [email protected] > | ||
| */ | ||
| interface ValueParser { | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,22 +5,21 @@ | |
| namespace ValueValidators; | ||
|
|
||
| /** | ||
| * @license GPL-2.0+ | ||
| * @license GPL-2.0-or-later | ||
| * @author Jeroen De Dauw < [email protected] > | ||
| */ | ||
| class Error { | ||
|
|
||
| public const SEVERITY_ERROR = 9; | ||
| public const SEVERITY_WARNING = 4; | ||
|
|
||
| private $text; | ||
| private $severity; | ||
| private $property; | ||
| private string $text; | ||
| private int $severity; | ||
| private ?string $property; | ||
| private string $code; | ||
| private array $params; | ||
|
|
||
| private $code; | ||
| private $params; | ||
|
|
||
| public static function newError( string $text = '', string $property = null, string $code = 'invalid', array $params = [] ): self { | ||
| public static function newError( string $text = '', ?string $property = null, string $code = 'invalid', array $params = [] ): self { | ||
| return new self( $text, self::SEVERITY_ERROR, $property, $code, $params ); | ||
| } | ||
|
|
||
|
|
@@ -37,7 +36,7 @@ public function getText(): string { | |
| } | ||
|
|
||
| /** | ||
| * @return integer, element of the ValueValidatorError::SEVERITY_ enum | ||
| * @return int element of the ValueValidatorError::SEVERITY_ enum | ||
| */ | ||
| public function getSeverity(): int { | ||
| return $this->severity; | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,13 +5,13 @@ | |
| namespace ValueValidators; | ||
|
|
||
| /** | ||
| * @license GPL-2.0+ | ||
| * @license GPL-2.0-or-later | ||
| * @author Jeroen De Dauw < [email protected] > | ||
| */ | ||
| final class Result { | ||
|
|
||
| private $isValid; | ||
| private $errors; | ||
| private bool $isValid; | ||
| private array $errors; | ||
|
|
||
| /** | ||
| * @return self | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,7 +5,7 @@ | |
| namespace ValueValidators; | ||
|
|
||
| /** | ||
| * @license GPL-2.0+ | ||
| * @license GPL-2.0-or-later | ||
| * @author Jeroen De Dauw < [email protected] > | ||
| */ | ||
| interface ValueValidator { | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,7 +13,7 @@ | |
| * @group ValueFormatters | ||
| * @group DataValueExtensions | ||
| * | ||
| * @license GPL-2.0+ | ||
| * @license GPL-2.0-or-later | ||
| * @author Jeroen De Dauw < [email protected] > | ||
| */ | ||
| class FormatterOptionsTest extends TestCase { | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,7 +13,7 @@ | |
| * @group ValueParsers | ||
| * @group DataValueExtensions | ||
| * | ||
| * @license GPL-2.0+ | ||
| * @license GPL-2.0-or-later | ||
| * @author Jeroen De Dauw < [email protected] > | ||
| */ | ||
| class ParserOptionsTest extends TestCase { | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,7 +13,7 @@ | |
| * @group ValueValidators | ||
| * @group DataValueExtensions | ||
| * | ||
| * @license GPL-2.0+ | ||
| * @license GPL-2.0-or-later | ||
| * @author Jeroen De Dauw < [email protected] > | ||
| */ | ||
| class ErrorTest extends TestCase { | ||
|
|
@@ -49,7 +49,7 @@ public function testNewError() { | |
| */ | ||
| $this->assertInstanceOf( 'ValueValidators\Error', $error ); | ||
|
|
||
| $this->assertTrue( is_string( $error->getProperty() ) || is_null( $error->getProperty() ) ); | ||
| $this->assertTrue( is_string( $error->getProperty() ) || $error->getProperty() === null ); | ||
|
|
||
| if ( count( $args ) > 0 ) { | ||
| $this->assertSame( $args[0], $error->getText() ); | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh. Good to know. https://php.watch/versions/8.4/implicitly-marking-parameter-type-nullable-deprecated