-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
131 changed files
with
880 additions
and
143 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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 |
---|---|---|
|
@@ -16,6 +16,7 @@ | |
|
||
use PhpCsFixer\AbstractFixer; | ||
use PhpCsFixer\Fixer\ConfigurableFixerInterface; | ||
use PhpCsFixer\Fixer\ConfigurableFixerTrait; | ||
use PhpCsFixer\FixerConfiguration\AllowedValueSubset; | ||
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver; | ||
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface; | ||
|
@@ -34,6 +35,9 @@ | |
*/ | ||
final class NoAliasFunctionsFixer extends AbstractFixer implements ConfigurableFixerInterface | ||
{ | ||
/** @use ConfigurableFixerTrait<_Configuration> */ | ||
use ConfigurableFixerTrait; | ||
|
||
private const SETS = [ | ||
'@internal' => [ | ||
'diskfreespace' => 'disk_free_space', | ||
|
@@ -160,10 +164,8 @@ final class NoAliasFunctionsFixer extends AbstractFixer implements ConfigurableF | |
*/ | ||
private array $aliases = []; | ||
|
||
public function configure(array $configuration): void | ||
protected function configurePostNormalisation(): void | ||
Check warning on line 167 in src/Fixer/Alias/NoAliasFunctionsFixer.php GitHub Actions / PHP 8.3 mutation tests
|
||
{ | ||
parent::configure($configuration); | ||
|
||
$this->aliases = []; | ||
|
||
foreach ($this->configuration['sets'] as $set) { | ||
|
This file contains 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 |
---|---|---|
|
@@ -16,6 +16,7 @@ | |
|
||
use PhpCsFixer\AbstractFixer; | ||
use PhpCsFixer\Fixer\ConfigurableFixerInterface; | ||
use PhpCsFixer\Fixer\ConfigurableFixerTrait; | ||
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver; | ||
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface; | ||
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder; | ||
|
@@ -31,14 +32,16 @@ | |
*/ | ||
final class NoMixedEchoPrintFixer extends AbstractFixer implements ConfigurableFixerInterface | ||
{ | ||
/** @use ConfigurableFixerTrait<_Configuration> */ | ||
use ConfigurableFixerTrait; | ||
|
||
/** | ||
* @var T_ECHO|T_PRINT | ||
*/ | ||
private int $candidateTokenType; | ||
|
||
public function configure(array $configuration): void | ||
protected function configurePostNormalisation(): void | ||
Check warning on line 43 in src/Fixer/Alias/NoMixedEchoPrintFixer.php GitHub Actions / PHP 8.3 mutation tests
|
||
{ | ||
parent::configure($configuration); | ||
|
||
$this->candidateTokenType = 'echo' === $this->configuration['use'] ? T_PRINT : T_ECHO; | ||
} | ||
|
This file contains 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 |
---|---|---|
|
@@ -16,6 +16,7 @@ | |
|
||
use PhpCsFixer\AbstractFunctionReferenceFixer; | ||
use PhpCsFixer\Fixer\ConfigurableFixerInterface; | ||
use PhpCsFixer\Fixer\ConfigurableFixerTrait; | ||
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver; | ||
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface; | ||
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder; | ||
|
@@ -32,6 +33,9 @@ | |
*/ | ||
final class RandomApiMigrationFixer extends AbstractFunctionReferenceFixer implements ConfigurableFixerInterface | ||
{ | ||
/** @use ConfigurableFixerTrait<_Configuration> */ | ||
use ConfigurableFixerTrait; | ||
|
||
/** | ||
* @var array<string, array<int, int>> | ||
*/ | ||
|
@@ -43,9 +47,8 @@ final class RandomApiMigrationFixer extends AbstractFunctionReferenceFixer imple | |
'random_int' => [0, 2], | ||
]; | ||
|
||
public function configure(array $configuration): void | ||
protected function configurePostNormalisation(): void | ||
Check warning on line 50 in src/Fixer/Alias/RandomApiMigrationFixer.php GitHub Actions / PHP 8.3 mutation tests
|
||
{ | ||
parent::configure($configuration); | ||
|
||
foreach ($this->configuration['replacements'] as $functionName => $replacement) { | ||
$this->configuration['replacements'][$functionName] = [ | ||
|
This file contains 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 |
---|---|---|
|
@@ -16,6 +16,7 @@ | |
|
||
use PhpCsFixer\AbstractFixer; | ||
use PhpCsFixer\Fixer\ConfigurableFixerInterface; | ||
use PhpCsFixer\Fixer\ConfigurableFixerTrait; | ||
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver; | ||
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface; | ||
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder; | ||
|
@@ -33,14 +34,16 @@ | |
*/ | ||
final class ArraySyntaxFixer extends AbstractFixer implements ConfigurableFixerInterface | ||
{ | ||
/** @use ConfigurableFixerTrait<_Configuration> */ | ||
use ConfigurableFixerTrait; | ||
|
||
/** | ||
* @var CT::T_ARRAY_SQUARE_BRACE_OPEN|T_ARRAY | ||
*/ | ||
private $candidateTokenKind; | ||
|
||
public function configure(array $configuration): void | ||
protected function configurePostNormalisation(): void | ||
Check warning on line 45 in src/Fixer/ArrayNotation/ArraySyntaxFixer.php GitHub Actions / PHP 8.3 mutation tests
|
||
{ | ||
parent::configure($configuration); | ||
|
||
$this->resolveCandidateTokenKind(); | ||
} | ||
|
This file contains 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 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 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 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 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 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 |
---|---|---|
|
@@ -16,6 +16,7 @@ | |
|
||
use PhpCsFixer\AbstractFixer; | ||
use PhpCsFixer\Fixer\ConfigurableFixerInterface; | ||
use PhpCsFixer\Fixer\ConfigurableFixerTrait; | ||
use PhpCsFixer\Fixer\Indentation; | ||
use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface; | ||
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver; | ||
|
@@ -30,8 +31,25 @@ | |
use PhpCsFixer\Tokenizer\Tokens; | ||
use PhpCsFixer\Tokenizer\TokensAnalyzer; | ||
|
||
/** | ||
* @phpstan-type _Configuration array{ | ||
* control_structures_opening_brace: 'next_line_unless_newline_at_signature_end'|'same_line' | ||
* functions_opening_brace: 'next_line_unless_newline_at_signature_end'|'same_line' | ||
* anonymous_functions_opening_brace: 'next_line_unless_newline_at_signature_end'|'same_line' | ||
* classes_opening_brace: 'next_line_unless_newline_at_signature_end'|'same_line' | ||
* anonymous_classes_opening_brace: 'next_line_unless_newline_at_signature_end'|'same_line' | ||
* allow_single_line_empty_anonymous_classes: bool, | ||
* allow_single_line_anonymous_functions: bool, | ||
* } | ||
* @implements ConfigurableFixerInterface<_Configuration> | ||
*/ | ||
final class BracesPositionFixer extends AbstractFixer implements ConfigurableFixerInterface, WhitespacesAwareFixerInterface | ||
{ | ||
/** @use ConfigurableFixerTrait<_Configuration> */ | ||
use ConfigurableFixerTrait; | ||
/** @use ConfigurableFixerTrait<_Configuration> */ | ||
use ConfigurableFixerTrait; | ||
|
||
use Indentation; | ||
|
||
/** | ||
|
@@ -338,7 +356,8 @@ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void | |
} | ||
} | ||
|
||
protected function createConfigurationDefinition(): FixerConfigurationResolverInterface | ||
/** @protected */ | ||
public function createConfigurationDefinition(): FixerConfigurationResolverInterface | ||
Check warning on line 360 in src/Fixer/Basic/BracesPositionFixer.php GitHub Actions / PHP 8.3 mutation tests
|
||
{ | ||
return new FixerConfigurationResolver([ | ||
(new FixerOptionBuilder('control_structures_opening_brace', 'The position of the opening brace of control structures‘ body.')) | ||
|
This file contains 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 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 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.