'standalone',
],
'method_chaining_indentation' => true,
- 'modernize_strpos' => false, // requires 8.0+
+ 'modernize_strpos' => true,
'modernize_types_casting' => true,
'multiline_comment_opening_closing' => true,
'multiline_string_to_heredoc' => false,
@@ -344,13 +344,13 @@ final class CodeIgniter4 extends AbstractRuleset
'normalize_index_brace' => true,
'not_operator_with_space' => false,
'not_operator_with_successor_space' => true,
- 'nullable_type_declaration' => false, // requires 8.0+
+ 'nullable_type_declaration' => ['syntax' => 'question_mark'],
'nullable_type_declaration_for_default_null_value' => true,
'numeric_literal_separator' => false,
'object_operator_without_whitespace' => true,
'octal_notation' => false, // requires 8.1+
'operator_linebreak' => ['only_booleans' => true, 'position' => 'beginning'],
- 'ordered_attributes' => false, // requires 8.0+
+ 'ordered_attributes' => ['order' => [], 'sort_algorithm' => 'alpha'],
'ordered_class_elements' => [
'order' => [
'use_trait',
@@ -366,10 +366,14 @@ final class CodeIgniter4 extends AbstractRuleset
'imports_order' => ['class', 'function', 'const'],
'case_sensitive' => false,
],
- 'ordered_interfaces' => false,
- 'ordered_traits' => false,
- 'ordered_types' => false, // requires 8.0+
- 'php_unit_attributes' => false, // requires 8.1+
+ 'ordered_interfaces' => false,
+ 'ordered_traits' => false,
+ 'ordered_types' => [
+ 'null_adjustment' => 'always_last',
+ 'sort_algorithm' => 'alpha',
+ 'case_sensitive' => false,
+ ],
+ 'php_unit_attributes' => true,
'php_unit_construct' => [
'assertions' => [
'assertSame',
@@ -689,7 +693,7 @@ final class CodeIgniter4 extends AbstractRuleset
],
];
- $this->requiredPHPVersion = 70400;
+ $this->requiredPHPVersion = 80100;
$this->autoActivateIsRiskyAllowed = true;
}
diff --git a/vendor/friendsofphp/php-cs-fixer/CHANGELOG.md b/vendor/friendsofphp/php-cs-fixer/CHANGELOG.md
index 90990e65..d3de6e45 100755
--- a/vendor/friendsofphp/php-cs-fixer/CHANGELOG.md
+++ b/vendor/friendsofphp/php-cs-fixer/CHANGELOG.md
@@ -3,6 +3,41 @@ CHANGELOG for PHP CS Fixer
This file contains changelogs for stable releases only.
+Changelog for v3.59.3
+---------------------
+
+* refactor: refactor to templated trait+interface (#7988)
+
+Changelog for v3.59.2
+---------------------
+
+* fix: "list" is reserved type (#8087)
+* chore: add missing type in method prototype (#8088)
+* CI: bump Ubuntu version (#8086)
+* deps: bump infection to unblock PHPUnit 11, and few more as chore (#8083)
+
+Changelog for v3.59.1
+---------------------
+
+* fix: Bump React's JSON decoder buffer size (#8068)
+* docs: options - handle enums in dicts (#8082)
+
+Changelog for v3.59.0
+---------------------
+
+* feat(Docker): Multi-arch build (support for `arm64`) (#8079)
+* feat: `@PhpCsFixer` ruleset - normalise implicit backslashes in single quoted strings (#7965)
+* feat: `SimpleToComplexStringVariableFixer` - support variable being an array (#8064)
+* fix: Look up for PHPDoc's variable name by only chars allowed in the variables (#8062)
+* fix: Update `PhpUnitTestCaseStaticMethodCallsFixer::STATIC_METHODS` (#8073)
+* fix: `native_constant_invocation` - array constants with native constant names (#8008)
+* chore: update PHPStan (#8060)
+* CI: Update PHPStan to 1.11.4 (#8074)
+* docs: don't expose list as config type for dicts (#8081)
+* docs: Make wording in `final_class` docs less dismissive (#8065)
+* docs: Update 1-bug_report.yml (#8067)
+* DX: Remove version from Docker Compose files (#8061)
+
Changelog for v3.58.1
---------------------
diff --git a/vendor/friendsofphp/php-cs-fixer/composer.json b/vendor/friendsofphp/php-cs-fixer/composer.json
index e0c8b6d6..f291eb3a 100755
--- a/vendor/friendsofphp/php-cs-fixer/composer.json
+++ b/vendor/friendsofphp/php-cs-fixer/composer.json
@@ -46,16 +46,16 @@
"symfony/stopwatch": "^5.4 || ^6.0 || ^7.0"
},
"require-dev": {
- "facile-it/paraunit": "^1.3 || ^2.0",
- "infection/infection": "^0.27.11",
+ "facile-it/paraunit": "^1.3 || ^2.3",
+ "infection/infection": "^0.29.5",
"justinrainbow/json-schema": "^5.2",
"keradus/cli-executor": "^2.1",
"mikey179/vfsstream": "^1.6.11",
"php-coveralls/php-coveralls": "^2.7",
"php-cs-fixer/accessible-object": "^1.1",
- "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.4",
- "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.4",
- "phpunit/phpunit": "^9.6 || ^10.5.5 || ^11.0.2",
+ "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.5",
+ "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.5",
+ "phpunit/phpunit": "^9.6.19 || ^10.5.21 || ^11.2",
"symfony/var-dumper": "^5.4 || ^6.0 || ^7.0",
"symfony/yaml": "^5.4 || ^6.0 || ^7.0"
},
@@ -66,7 +66,10 @@
"autoload": {
"psr-4": {
"PhpCsFixer\\": "src/"
- }
+ },
+ "exclude-from-classmap": [
+ "src/Fixer/Internal/*"
+ ]
},
"autoload-dev": {
"psr-4": {
diff --git a/vendor/friendsofphp/php-cs-fixer/src/AbstractDoctrineAnnotationFixer.php b/vendor/friendsofphp/php-cs-fixer/src/AbstractDoctrineAnnotationFixer.php
index 327fa238..7ca969fb 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/AbstractDoctrineAnnotationFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/AbstractDoctrineAnnotationFixer.php
@@ -26,6 +26,17 @@ use PhpCsFixer\Tokenizer\TokensAnalyzer;
/**
* @internal
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * scalar_types?: bool,
+ * union_types?: bool
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * scalar_types: bool,
+ * union_types: bool
+ * }
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
*/
abstract class AbstractDoctrineAnnotationFixer extends AbstractFixer implements ConfigurableFixerInterface
{
@@ -53,7 +64,7 @@ abstract class AbstractDoctrineAnnotationFixer extends AbstractFixer implements
$doctrineAnnotationTokens = DoctrineAnnotationTokens::createFromDocComment(
$docCommentToken,
- $this->configuration['ignored_tags']
+ $this->configuration['ignored_tags'] // @phpstan-ignore-line
);
$this->fixAnnotations($doctrineAnnotationTokens);
@@ -71,15 +82,6 @@ abstract class AbstractDoctrineAnnotationFixer extends AbstractFixer implements
return new FixerConfigurationResolver([
(new FixerOptionBuilder('ignored_tags', 'List of tags that must not be treated as Doctrine Annotations.'))
->setAllowedTypes(['string[]'])
- ->setAllowedValues([static function (array $values): bool {
- foreach ($values as $value) {
- if (!\is_string($value)) {
- return false;
- }
- }
-
- return true;
- }])
->setDefault([
// PHPDocumentor 1
'abstract',
diff --git a/vendor/friendsofphp/php-cs-fixer/src/AbstractFixer.php b/vendor/friendsofphp/php-cs-fixer/src/AbstractFixer.php
index 7b9ac1a0..fd193f41 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/AbstractFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/AbstractFixer.php
@@ -14,19 +14,11 @@ declare(strict_types=1);
namespace PhpCsFixer;
-use PhpCsFixer\ConfigurationException\InvalidFixerConfigurationException;
-use PhpCsFixer\ConfigurationException\InvalidForEnvFixerConfigurationException;
use PhpCsFixer\ConfigurationException\RequiredFixerConfigurationException;
-use PhpCsFixer\Console\Application;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
use PhpCsFixer\Fixer\FixerInterface;
use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
-use PhpCsFixer\FixerConfiguration\DeprecatedFixerOption;
-use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
-use PhpCsFixer\FixerConfiguration\InvalidOptionsForEnvException;
use PhpCsFixer\Tokenizer\Tokens;
-use Symfony\Component\OptionsResolver\Exception\ExceptionInterface;
-use Symfony\Component\OptionsResolver\Exception\MissingOptionsException;
/**
* @author Dariusz Rumiński
@@ -35,21 +27,11 @@ use Symfony\Component\OptionsResolver\Exception\MissingOptionsException;
*/
abstract class AbstractFixer implements FixerInterface
{
- /**
- * @var null|array
- */
- protected $configuration;
-
/**
* @var WhitespacesFixerConfig
*/
protected $whitespacesConfig;
- /**
- * @var null|FixerConfigurationResolverInterface
- */
- private $configurationDefinition;
-
public function __construct()
{
if ($this instanceof ConfigurableFixerInterface) {
@@ -67,7 +49,7 @@ abstract class AbstractFixer implements FixerInterface
final public function fix(\SplFileInfo $file, Tokens $tokens): void
{
- if ($this instanceof ConfigurableFixerInterface && null === $this->configuration) {
+ if ($this instanceof ConfigurableFixerInterface && property_exists($this, 'configuration') && null === $this->configuration) {
throw new RequiredFixerConfigurationException($this->getName(), 'Configuration is required.');
}
@@ -99,68 +81,6 @@ abstract class AbstractFixer implements FixerInterface
return true;
}
- /**
- * @param array $configuration
- */
- public function configure(array $configuration): void
- {
- if (!$this instanceof ConfigurableFixerInterface) {
- throw new \LogicException('Cannot configure using Abstract parent, child not implementing "PhpCsFixer\Fixer\ConfigurableFixerInterface".');
- }
-
- foreach ($this->getConfigurationDefinition()->getOptions() as $option) {
- if (!$option instanceof DeprecatedFixerOption) {
- continue;
- }
-
- $name = $option->getName();
- if (\array_key_exists($name, $configuration)) {
- Utils::triggerDeprecation(new \InvalidArgumentException(sprintf(
- 'Option "%s" for rule "%s" is deprecated and will be removed in version %d.0. %s',
- $name,
- $this->getName(),
- Application::getMajorVersion() + 1,
- str_replace('`', '"', $option->getDeprecationMessage())
- )));
- }
- }
-
- try {
- $this->configuration = $this->getConfigurationDefinition()->resolve($configuration);
- } catch (MissingOptionsException $exception) {
- throw new RequiredFixerConfigurationException(
- $this->getName(),
- sprintf('Missing required configuration: %s', $exception->getMessage()),
- $exception
- );
- } catch (InvalidOptionsForEnvException $exception) {
- throw new InvalidForEnvFixerConfigurationException(
- $this->getName(),
- sprintf('Invalid configuration for env: %s', $exception->getMessage()),
- $exception
- );
- } catch (ExceptionInterface $exception) {
- throw new InvalidFixerConfigurationException(
- $this->getName(),
- sprintf('Invalid configuration: %s', $exception->getMessage()),
- $exception
- );
- }
- }
-
- public function getConfigurationDefinition(): FixerConfigurationResolverInterface
- {
- if (!$this instanceof ConfigurableFixerInterface) {
- throw new \LogicException(sprintf('Cannot get configuration definition using Abstract parent, child "%s" not implementing "PhpCsFixer\Fixer\ConfigurableFixerInterface".', static::class));
- }
-
- if (null === $this->configurationDefinition) {
- $this->configurationDefinition = $this->createConfigurationDefinition();
- }
-
- return $this->configurationDefinition;
- }
-
public function setWhitespacesConfig(WhitespacesFixerConfig $config): void
{
if (!$this instanceof WhitespacesAwareFixerInterface) {
@@ -172,15 +92,6 @@ abstract class AbstractFixer implements FixerInterface
abstract protected function applyFix(\SplFileInfo $file, Tokens $tokens): void;
- protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
- {
- if (!$this instanceof ConfigurableFixerInterface) {
- throw new \LogicException('Cannot create configuration definition using Abstract parent, child not implementing "PhpCsFixer\Fixer\ConfigurableFixerInterface".');
- }
-
- throw new \LogicException('Not implemented.');
- }
-
private function getDefaultWhitespacesFixerConfig(): WhitespacesFixerConfig
{
static $defaultWhitespacesFixerConfig = null;
diff --git a/vendor/friendsofphp/php-cs-fixer/src/AbstractPhpdocToTypeDeclarationFixer.php b/vendor/friendsofphp/php-cs-fixer/src/AbstractPhpdocToTypeDeclarationFixer.php
index 4e50a678..174416cb 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/AbstractPhpdocToTypeDeclarationFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/AbstractPhpdocToTypeDeclarationFixer.php
@@ -18,6 +18,7 @@ use PhpCsFixer\DocBlock\Annotation;
use PhpCsFixer\DocBlock\DocBlock;
use PhpCsFixer\DocBlock\TypeExpression;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
@@ -31,9 +32,22 @@ use PhpCsFixer\Tokenizer\Tokens;
* @internal
*
* @phpstan-type _CommonTypeInfo array{commonType: string, isNullable: bool}
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * scalar_types?: bool,
+ * union_types?: bool
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * scalar_types: bool,
+ * union_types: bool
+ * }
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
*/
abstract class AbstractPhpdocToTypeDeclarationFixer extends AbstractFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
private const REGEX_CLASS = '(?:\\\?+'.TypeExpression::REGEX_IDENTIFIER
.'(\\\\'.TypeExpression::REGEX_IDENTIFIER.')*+)';
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Console/Application.php b/vendor/friendsofphp/php-cs-fixer/src/Console/Application.php
index cc4278f9..c84cff9f 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Console/Application.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Console/Application.php
@@ -44,7 +44,7 @@ use Symfony\Component\Console\Output\OutputInterface;
final class Application extends BaseApplication
{
public const NAME = 'PHP CS Fixer';
- public const VERSION = '3.58.1';
+ public const VERSION = '3.59.3';
public const VERSION_CODENAME = '7th Gear';
private ToolInfo $toolInfo;
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Console/Command/DescribeCommand.php b/vendor/friendsofphp/php-cs-fixer/src/Console/Command/DescribeCommand.php
index b8c3ba6c..03ec9209 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Console/Command/DescribeCommand.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Console/Command/DescribeCommand.php
@@ -24,6 +24,7 @@ use PhpCsFixer\Fixer\ConfigurableFixerInterface;
use PhpCsFixer\Fixer\DeprecatedFixerInterface;
use PhpCsFixer\Fixer\ExperimentalFixerInterface;
use PhpCsFixer\Fixer\FixerInterface;
+use PhpCsFixer\Fixer\InternalFixerInterface;
use PhpCsFixer\FixerConfiguration\AliasedFixerOption;
use PhpCsFixer\FixerConfiguration\AllowedValueSubset;
use PhpCsFixer\FixerConfiguration\DeprecatedFixerOption;
@@ -192,6 +193,13 @@ final class DescribeCommand extends Command
$output->writeln('');
}
+ if ($fixer instanceof InternalFixerInterface) {
+ $output->writeln('Fixer applying this rule is INTERNAL..');
+ $output->writeln('It is expected to be used only on PHP CS Fixer project itself.');
+
+ $output->writeln('');
+ }
+
if ($fixer->isRisky()) {
$output->writeln('Fixer applying this rule is RISKY.');
diff --git a/vendor/friendsofphp/php-cs-fixer/src/DocBlock/Annotation.php b/vendor/friendsofphp/php-cs-fixer/src/DocBlock/Annotation.php
index 7c331a52..9fb304d9 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/DocBlock/Annotation.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/DocBlock/Annotation.php
@@ -171,14 +171,17 @@ final class Annotation
}
/**
- * @return null|string
- *
* @internal
*/
- public function getVariableName()
+ public function getVariableName(): ?string
{
$type = preg_quote($this->getTypesContent() ?? '', '/');
- $regex = "/@{$this->tag->getName()}\\s+({$type}\\s*)?(&\\s*)?(\\.{3}\\s*)?(?\\$.+?)(?:[\\s*]|$)/";
+ $regex = sprintf(
+ '/@%s\s+(%s\s*)?(&\s*)?(\.{3}\s*)?(?\$%s)(?:.*|$)/',
+ $this->tag->getName(),
+ $type,
+ TypeExpression::REGEX_IDENTIFIER
+ );
if (Preg::match($regex, $this->lines[0]->getContent(), $matches)) {
return $matches['variable'];
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Documentation/FixerDocumentGenerator.php b/vendor/friendsofphp/php-cs-fixer/src/Documentation/FixerDocumentGenerator.php
index 52a06042..9d707b31 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Documentation/FixerDocumentGenerator.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Documentation/FixerDocumentGenerator.php
@@ -167,7 +167,7 @@ final class FixerDocumentGenerator
if (null === $allowed) {
$allowedKind = 'Allowed types';
$allowed = array_map(
- static fn (string $value): string => '``'.(str_ends_with($value, '[]') ? sprintf('list<%s>', substr($value, 0, -2)) : $value).'``',
+ static fn (string $value): string => '``'.Utils::convertArrayTypeToList($value).'``',
$option->getAllowedTypes(),
);
} else {
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/AbstractPhpUnitFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/AbstractPhpUnitFixer.php
index afc348ff..0b4c4b2f 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/AbstractPhpUnitFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/AbstractPhpUnitFixer.php
@@ -138,6 +138,7 @@ abstract class AbstractPhpUnitFixer extends AbstractFixer
}
}
$doc = $this->makeDocBlockMultiLineIfNeeded($doc, $tokens, $docBlockIndex, $annotation);
+
$lines = $this->addInternalAnnotation($doc, $tokens, $docBlockIndex, $annotation);
$lines = implode('', $lines);
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Alias/NoAliasFunctionsFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Alias/NoAliasFunctionsFixer.php
index 3fceb600..eeed6433 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Alias/NoAliasFunctionsFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Alias/NoAliasFunctionsFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\Alias;
use PhpCsFixer\AbstractFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\AllowedValueSubset;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
@@ -31,9 +32,21 @@ use PhpCsFixer\Tokenizer\Tokens;
/**
* @author Vladimir Reznichenko
* @author Dariusz Rumiński
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * sets?: list<'@all'|'@exif'|'@ftp'|'@IMAP'|'@internal'|'@ldap'|'@mbreg'|'@mysqli'|'@oci'|'@odbc'|'@openssl'|'@pcntl'|'@pg'|'@posix'|'@snmp'|'@sodium'|'@time'>
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * sets: list<'@all'|'@exif'|'@ftp'|'@IMAP'|'@internal'|'@ldap'|'@mbreg'|'@mysqli'|'@oci'|'@odbc'|'@openssl'|'@pcntl'|'@pg'|'@posix'|'@snmp'|'@sodium'|'@time'>
+ * }
*/
final class NoAliasFunctionsFixer extends AbstractFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
private const SETS = [
'@internal' => [
'diskfreespace' => 'disk_free_space',
@@ -160,23 +173,6 @@ final class NoAliasFunctionsFixer extends AbstractFixer implements ConfigurableF
*/
private array $aliases = [];
- public function configure(array $configuration): void
- {
- parent::configure($configuration);
-
- $this->aliases = [];
-
- foreach ($this->configuration['sets'] as $set) {
- if ('@all' === $set) {
- $this->aliases = array_merge(...array_values(self::SETS));
-
- break;
- }
-
- $this->aliases = array_merge($this->aliases, self::SETS[$set]);
- }
- }
-
public function getDefinition(): FixerDefinitionInterface
{
return new FixerDefinition(
@@ -240,6 +236,21 @@ mbereg_search_getregs();
return true;
}
+ protected function configurePostNormalisation(): void
+ {
+ $this->aliases = [];
+
+ foreach ($this->configuration['sets'] as $set) {
+ if ('@all' === $set) {
+ $this->aliases = array_merge(...array_values(self::SETS));
+
+ break;
+ }
+
+ $this->aliases = array_merge($this->aliases, self::SETS[$set]);
+ }
+ }
+
protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
{
$functionsAnalyzer = new FunctionsAnalyzer();
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Alias/NoMixedEchoPrintFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Alias/NoMixedEchoPrintFixer.php
index e8b1af95..7a0292fe 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Alias/NoMixedEchoPrintFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Alias/NoMixedEchoPrintFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\Alias;
use PhpCsFixer\AbstractFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
@@ -28,21 +29,26 @@ use PhpCsFixer\Tokenizer\Tokens;
/**
* @author Sullivan Senechal
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * use?: 'echo'|'print'
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * use: 'echo'|'print'
+ * }
*/
final class NoMixedEchoPrintFixer extends AbstractFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
/**
* @var T_ECHO|T_PRINT
*/
private int $candidateTokenType;
- public function configure(array $configuration): void
- {
- parent::configure($configuration);
-
- $this->candidateTokenType = 'echo' === $this->configuration['use'] ? T_PRINT : T_ECHO;
- }
-
public function getDefinition(): FixerDefinitionInterface
{
return new FixerDefinition(
@@ -69,6 +75,11 @@ final class NoMixedEchoPrintFixer extends AbstractFixer implements ConfigurableF
return $tokens->isTokenKindFound($this->candidateTokenType);
}
+ protected function configurePostNormalisation(): void
+ {
+ $this->candidateTokenType = 'echo' === $this->configuration['use'] ? T_PRINT : T_ECHO;
+ }
+
protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
{
foreach ($tokens as $index => $token) {
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Alias/RandomApiMigrationFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Alias/RandomApiMigrationFixer.php
index 6d8c441f..4c8c4613 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Alias/RandomApiMigrationFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Alias/RandomApiMigrationFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\Alias;
use PhpCsFixer\AbstractFunctionReferenceFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
@@ -29,9 +30,21 @@ use Symfony\Component\OptionsResolver\Exception\InvalidOptionsException;
/**
* @author Vladimir Reznichenko
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * replacements?: array
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * replacements: array
+ * }
*/
final class RandomApiMigrationFixer extends AbstractFunctionReferenceFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
/**
* @var array>
*/
@@ -43,11 +56,6 @@ final class RandomApiMigrationFixer extends AbstractFunctionReferenceFixer imple
'random_int' => [0, 2],
];
- public function configure(array $configuration): void
- {
- parent::configure($configuration);
- }
-
public function getDefinition(): FixerDefinitionInterface
{
return new FixerDefinition(
@@ -119,7 +127,7 @@ final class RandomApiMigrationFixer extends AbstractFunctionReferenceFixer imple
{
return new FixerConfigurationResolver([
(new FixerOptionBuilder('replacements', 'Mapping between replaced functions with the new ones.'))
- ->setAllowedTypes(['array'])
+ ->setAllowedTypes(['array'])
->setAllowedValues([static function (array $value): bool {
foreach ($value as $functionName => $replacement) {
if (!\array_key_exists($functionName, self::$argumentCounts)) {
@@ -128,14 +136,6 @@ final class RandomApiMigrationFixer extends AbstractFunctionReferenceFixer imple
$functionName
));
}
-
- if (!\is_string($replacement)) {
- throw new InvalidOptionsException(sprintf(
- 'Replacement for function "%s" must be a string, "%s" given.',
- $functionName,
- get_debug_type($replacement)
- ));
- }
}
return true;
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/ArraySyntaxFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/ArraySyntaxFixer.php
index ea418f5e..2eab59c6 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/ArraySyntaxFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/ArraySyntaxFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\ArrayNotation;
use PhpCsFixer\AbstractFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
@@ -30,21 +31,26 @@ use PhpCsFixer\Tokenizer\Tokens;
* @author Gregor Harlan
* @author Sebastiaan Stok
* @author Dariusz Rumiński
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * syntax?: 'long'|'short'
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * syntax: 'long'|'short'
+ * }
*/
final class ArraySyntaxFixer extends AbstractFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
/**
* @var CT::T_ARRAY_SQUARE_BRACE_OPEN|T_ARRAY
*/
private $candidateTokenKind;
- public function configure(array $configuration): void
- {
- parent::configure($configuration);
-
- $this->resolveCandidateTokenKind();
- }
-
public function getDefinition(): FixerDefinitionInterface
{
return new FixerDefinition(
@@ -76,6 +82,11 @@ final class ArraySyntaxFixer extends AbstractFixer implements ConfigurableFixerI
return $tokens->isTokenKindFound($this->candidateTokenKind);
}
+ protected function configurePostNormalisation(): void
+ {
+ $this->resolveCandidateTokenKind();
+ }
+
protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
{
for ($index = $tokens->count() - 1; 0 <= $index; --$index) {
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/NoWhitespaceBeforeCommaInArrayFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/NoWhitespaceBeforeCommaInArrayFixer.php
index f2ff389d..e5e75489 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/NoWhitespaceBeforeCommaInArrayFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/NoWhitespaceBeforeCommaInArrayFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\ArrayNotation;
use PhpCsFixer\AbstractFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
@@ -27,9 +28,21 @@ use PhpCsFixer\Tokenizer\Tokens;
/**
* @author Adam Marczuk
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * after_heredoc?: bool
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * after_heredoc: bool
+ * }
*/
final class NoWhitespaceBeforeCommaInArrayFixer extends AbstractFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
public function getDefinition(): FixerDefinitionInterface
{
return new FixerDefinition(
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/WhitespaceAfterCommaInArrayFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/WhitespaceAfterCommaInArrayFixer.php
index ed4ef90d..88cd0724 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/WhitespaceAfterCommaInArrayFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/WhitespaceAfterCommaInArrayFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\ArrayNotation;
use PhpCsFixer\AbstractFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
@@ -29,9 +30,21 @@ use PhpCsFixer\Tokenizer\Tokens;
/**
* @author Adam Marczuk
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * ensure_single_space?: bool
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * ensure_single_space: bool
+ * }
*/
final class WhitespaceAfterCommaInArrayFixer extends AbstractFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
public function getDefinition(): FixerDefinitionInterface
{
return new FixerDefinition(
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/AttributeNotation/AttributeEmptyParenthesesFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/AttributeNotation/AttributeEmptyParenthesesFixer.php
index cba06046..8166a0f2 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/AttributeNotation/AttributeEmptyParenthesesFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/AttributeNotation/AttributeEmptyParenthesesFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\AttributeNotation;
use PhpCsFixer\AbstractFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
@@ -28,9 +29,21 @@ use PhpCsFixer\Tokenizer\Tokens;
/**
* @author HypeMC
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * use_parentheses?: bool
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * use_parentheses: bool
+ * }
*/
final class AttributeEmptyParenthesesFixer extends AbstractFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
public function getDefinition(): FixerDefinitionInterface
{
return new FixerDefinition(
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Basic/BracesFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Basic/BracesFixer.php
index 19a57988..cc1b14dc 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Basic/BracesFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Basic/BracesFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\Basic;
use PhpCsFixer\AbstractProxyFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\Fixer\ControlStructure\ControlStructureBracesFixer;
use PhpCsFixer\Fixer\ControlStructure\ControlStructureContinuationPositionFixer;
use PhpCsFixer\Fixer\DeprecatedFixerInterface;
@@ -37,9 +38,29 @@ use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
* @author Dariusz Rumiński
*
* @deprecated
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * allow_single_line_anonymous_class_with_empty_body?: bool,
+ * allow_single_line_closure?: bool,
+ * position_after_anonymous_constructs?: 'next'|'same',
+ * position_after_control_structures?: 'next'|'same',
+ * position_after_functions_and_oop_constructs?: 'next'|'same'
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * allow_single_line_anonymous_class_with_empty_body: bool,
+ * allow_single_line_closure: bool,
+ * position_after_anonymous_constructs: 'next'|'same',
+ * position_after_control_structures: 'next'|'same',
+ * position_after_functions_and_oop_constructs: 'next'|'same'
+ * }
*/
final class BracesFixer extends AbstractProxyFixer implements ConfigurableFixerInterface, WhitespacesAwareFixerInterface, DeprecatedFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
/**
* @internal
*/
@@ -152,10 +173,8 @@ class Foo
return array_keys($this->proxyFixers);
}
- public function configure(array $configuration): void
+ protected function configurePostNormalisation(): void
{
- parent::configure($configuration);
-
$this->getBracesPositionFixer()->configure([
'control_structures_opening_brace' => $this->translatePositionOption($this->configuration['position_after_control_structures']),
'functions_opening_brace' => $this->translatePositionOption($this->configuration['position_after_functions_and_oop_constructs']),
@@ -243,6 +262,9 @@ class Foo
return $this->controlStructureContinuationPositionFixer;
}
+ /**
+ * @return BracesPositionFixer::NEXT_LINE_UNLESS_NEWLINE_AT_SIGNATURE_END|BracesPositionFixer::SAME_LINE
+ */
private function translatePositionOption(string $option): string
{
return self::LINE_NEXT === $option
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Basic/BracesPositionFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Basic/BracesPositionFixer.php
index 710448a4..f010a1dd 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Basic/BracesPositionFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Basic/BracesPositionFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\Basic;
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,33 @@ use PhpCsFixer\Tokenizer\Token;
use PhpCsFixer\Tokenizer\Tokens;
use PhpCsFixer\Tokenizer\TokensAnalyzer;
+/**
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * allow_single_line_anonymous_functions?: bool,
+ * allow_single_line_empty_anonymous_classes?: bool,
+ * anonymous_classes_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',
+ * 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'
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * allow_single_line_anonymous_functions: bool,
+ * allow_single_line_empty_anonymous_classes: bool,
+ * anonymous_classes_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',
+ * 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'
+ * }
+ */
final class BracesPositionFixer extends AbstractFixer implements ConfigurableFixerInterface, WhitespacesAwareFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
use Indentation;
/**
@@ -144,6 +170,41 @@ $bar = function () { $result = true;
return -2;
}
+ /** @protected */
+ public function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('control_structures_opening_brace', 'The position of the opening brace of control structures‘ body.'))
+ ->setAllowedValues([self::NEXT_LINE_UNLESS_NEWLINE_AT_SIGNATURE_END, self::SAME_LINE])
+ ->setDefault(self::SAME_LINE)
+ ->getOption(),
+ (new FixerOptionBuilder('functions_opening_brace', 'The position of the opening brace of functions‘ body.'))
+ ->setAllowedValues([self::NEXT_LINE_UNLESS_NEWLINE_AT_SIGNATURE_END, self::SAME_LINE])
+ ->setDefault(self::NEXT_LINE_UNLESS_NEWLINE_AT_SIGNATURE_END)
+ ->getOption(),
+ (new FixerOptionBuilder('anonymous_functions_opening_brace', 'The position of the opening brace of anonymous functions‘ body.'))
+ ->setAllowedValues([self::NEXT_LINE_UNLESS_NEWLINE_AT_SIGNATURE_END, self::SAME_LINE])
+ ->setDefault(self::SAME_LINE)
+ ->getOption(),
+ (new FixerOptionBuilder('classes_opening_brace', 'The position of the opening brace of classes‘ body.'))
+ ->setAllowedValues([self::NEXT_LINE_UNLESS_NEWLINE_AT_SIGNATURE_END, self::SAME_LINE])
+ ->setDefault(self::NEXT_LINE_UNLESS_NEWLINE_AT_SIGNATURE_END)
+ ->getOption(),
+ (new FixerOptionBuilder('anonymous_classes_opening_brace', 'The position of the opening brace of anonymous classes‘ body.'))
+ ->setAllowedValues([self::NEXT_LINE_UNLESS_NEWLINE_AT_SIGNATURE_END, self::SAME_LINE])
+ ->setDefault(self::SAME_LINE)
+ ->getOption(),
+ (new FixerOptionBuilder('allow_single_line_empty_anonymous_classes', 'Allow anonymous classes to have opening and closing braces on the same line.'))
+ ->setAllowedTypes(['bool'])
+ ->setDefault(true)
+ ->getOption(),
+ (new FixerOptionBuilder('allow_single_line_anonymous_functions', 'Allow anonymous functions to have opening and closing braces on the same line.'))
+ ->setAllowedTypes(['bool'])
+ ->setDefault(true)
+ ->getOption(),
+ ]);
+ }
+
protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
{
$classyTokens = Token::getClassyTokenKinds();
@@ -338,40 +399,6 @@ $bar = function () { $result = true;
}
}
- protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
- {
- return new FixerConfigurationResolver([
- (new FixerOptionBuilder('control_structures_opening_brace', 'The position of the opening brace of control structures‘ body.'))
- ->setAllowedValues([self::NEXT_LINE_UNLESS_NEWLINE_AT_SIGNATURE_END, self::SAME_LINE])
- ->setDefault(self::SAME_LINE)
- ->getOption(),
- (new FixerOptionBuilder('functions_opening_brace', 'The position of the opening brace of functions‘ body.'))
- ->setAllowedValues([self::NEXT_LINE_UNLESS_NEWLINE_AT_SIGNATURE_END, self::SAME_LINE])
- ->setDefault(self::NEXT_LINE_UNLESS_NEWLINE_AT_SIGNATURE_END)
- ->getOption(),
- (new FixerOptionBuilder('anonymous_functions_opening_brace', 'The position of the opening brace of anonymous functions‘ body.'))
- ->setAllowedValues([self::NEXT_LINE_UNLESS_NEWLINE_AT_SIGNATURE_END, self::SAME_LINE])
- ->setDefault(self::SAME_LINE)
- ->getOption(),
- (new FixerOptionBuilder('classes_opening_brace', 'The position of the opening brace of classes‘ body.'))
- ->setAllowedValues([self::NEXT_LINE_UNLESS_NEWLINE_AT_SIGNATURE_END, self::SAME_LINE])
- ->setDefault(self::NEXT_LINE_UNLESS_NEWLINE_AT_SIGNATURE_END)
- ->getOption(),
- (new FixerOptionBuilder('anonymous_classes_opening_brace', 'The position of the opening brace of anonymous classes‘ body.'))
- ->setAllowedValues([self::NEXT_LINE_UNLESS_NEWLINE_AT_SIGNATURE_END, self::SAME_LINE])
- ->setDefault(self::SAME_LINE)
- ->getOption(),
- (new FixerOptionBuilder('allow_single_line_empty_anonymous_classes', 'Allow anonymous classes to have opening and closing braces on the same line.'))
- ->setAllowedTypes(['bool'])
- ->setDefault(true)
- ->getOption(),
- (new FixerOptionBuilder('allow_single_line_anonymous_functions', 'Allow anonymous functions to have opening and closing braces on the same line.'))
- ->setAllowedTypes(['bool'])
- ->setDefault(true)
- ->getOption(),
- ]);
- }
-
private function findParenthesisEnd(Tokens $tokens, int $structureTokenIndex): int
{
$nextIndex = $tokens->getNextMeaningfulToken($structureTokenIndex);
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Basic/CurlyBracesPositionFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Basic/CurlyBracesPositionFixer.php
index 324d0753..099b6381 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Basic/CurlyBracesPositionFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Basic/CurlyBracesPositionFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\Basic;
use PhpCsFixer\AbstractProxyFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\Fixer\DeprecatedFixerInterface;
use PhpCsFixer\Fixer\Indentation;
use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
@@ -25,9 +26,33 @@ use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
/**
* @deprecated
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * allow_single_line_anonymous_functions?: bool,
+ * allow_single_line_empty_anonymous_classes?: bool,
+ * anonymous_classes_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',
+ * 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'
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * allow_single_line_anonymous_functions: bool,
+ * allow_single_line_empty_anonymous_classes: bool,
+ * anonymous_classes_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',
+ * 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'
+ * }
*/
final class CurlyBracesPositionFixer extends AbstractProxyFixer implements ConfigurableFixerInterface, DeprecatedFixerInterface, WhitespacesAwareFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
use Indentation;
/**
@@ -61,13 +86,6 @@ final class CurlyBracesPositionFixer extends AbstractProxyFixer implements Confi
);
}
- public function configure(array $configuration): void
- {
- $this->bracesPositionFixer->configure($configuration);
-
- parent::configure($configuration);
- }
-
/**
* {@inheritdoc}
*
@@ -86,6 +104,14 @@ final class CurlyBracesPositionFixer extends AbstractProxyFixer implements Confi
];
}
+ /**
+ * @param _AutogeneratedInputConfiguration $configuration
+ */
+ protected function configurePreNormalisation(array $configuration): void
+ {
+ $this->bracesPositionFixer->configure($configuration);
+ }
+
protected function createProxyFixers(): array
{
return [
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Basic/NoTrailingCommaInSinglelineFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Basic/NoTrailingCommaInSinglelineFixer.php
index ef380230..f7d69226 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Basic/NoTrailingCommaInSinglelineFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Basic/NoTrailingCommaInSinglelineFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\Basic;
use PhpCsFixer\AbstractFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\AllowedValueSubset;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
@@ -27,8 +28,21 @@ use PhpCsFixer\Tokenizer\Analyzer\AttributeAnalyzer;
use PhpCsFixer\Tokenizer\CT;
use PhpCsFixer\Tokenizer\Tokens;
+/**
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * elements?: list<'arguments'|'array'|'array_destructuring'|'group_import'>
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * elements: list<'arguments'|'array'|'array_destructuring'|'group_import'>
+ * }
+ */
final class NoTrailingCommaInSinglelineFixer extends AbstractFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
public function getDefinition(): FixerDefinitionInterface
{
return new FixerDefinition(
@@ -95,7 +109,6 @@ final class NoTrailingCommaInSinglelineFixer extends AbstractFixer implements Co
private function shouldBeCleared(Tokens $tokens, int $openIndex): bool
{
- /** @var list $elements */
$elements = $this->configuration['elements'];
if ($tokens[$openIndex]->isGivenKind(CT::T_ARRAY_SQUARE_BRACE_OPEN)) {
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Basic/NonPrintableCharacterFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Basic/NonPrintableCharacterFixer.php
index cb885d14..7c3acfba 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Basic/NonPrintableCharacterFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Basic/NonPrintableCharacterFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\Basic;
use PhpCsFixer\AbstractFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
@@ -30,9 +31,21 @@ use PhpCsFixer\Tokenizer\Tokens;
* Removes Zero-width space (ZWSP), Non-breaking space (NBSP) and other invisible unicode symbols.
*
* @author Ivan Boprzenkov
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * use_escape_sequences_in_strings?: bool
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * use_escape_sequences_in_strings: bool
+ * }
*/
final class NonPrintableCharacterFixer extends AbstractFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
/**
* @var array
*/
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Basic/NumericLiteralSeparatorFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Basic/NumericLiteralSeparatorFixer.php
index 79d52e62..b062dcde 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Basic/NumericLiteralSeparatorFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Basic/NumericLiteralSeparatorFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\Basic;
use PhpCsFixer\AbstractFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
@@ -35,9 +36,23 @@ use PhpCsFixer\Tokenizer\Tokens;
*
* @author Marvin Heilemann
* @author Greg Korba
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * override_existing?: bool,
+ * strategy?: 'no_separator'|'use_separator'
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * override_existing: bool,
+ * strategy: 'no_separator'|'use_separator'
+ * }
*/
final class NumericLiteralSeparatorFixer extends AbstractFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
public const STRATEGY_USE_SEPARATOR = 'use_separator';
public const STRATEGY_NO_SEPARATOR = 'no_separator';
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Basic/PsrAutoloadingFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Basic/PsrAutoloadingFixer.php
index db42b697..e99c4395 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Basic/PsrAutoloadingFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Basic/PsrAutoloadingFixer.php
@@ -17,6 +17,7 @@ namespace PhpCsFixer\Fixer\Basic;
use PhpCsFixer\AbstractFixer;
use PhpCsFixer\DocBlock\TypeExpression;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
@@ -35,9 +36,21 @@ use PhpCsFixer\Tokenizer\TokensAnalyzer;
* @author Bram Gotink
* @author Graham Campbell
* @author Kuba Werłos
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * dir?: null|string
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * dir: null|string
+ * }
*/
final class PsrAutoloadingFixer extends AbstractFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
public function getDefinition(): FixerDefinitionInterface
{
return new FixerDefinition(
@@ -64,21 +77,6 @@ class InvalidName {}
);
}
- public function configure(array $configuration): void
- {
- parent::configure($configuration);
-
- if (null !== $this->configuration['dir']) {
- $realpath = realpath($this->configuration['dir']);
-
- if (false === $realpath) {
- throw new \InvalidArgumentException(sprintf('Failed to resolve configured directory "%s".', $this->configuration['dir']));
- }
-
- $this->configuration['dir'] = $realpath;
- }
- }
-
public function isCandidate(Tokens $tokens): bool
{
return $tokens->isAnyTokenKindsFound(Token::getClassyTokenKinds());
@@ -130,6 +128,19 @@ class InvalidName {}
return !Preg::match('{[/\\\](stub|fixture)s?[/\\\]}i', $file->getRealPath());
}
+ protected function configurePostNormalisation(): void
+ {
+ if (null !== $this->configuration['dir']) {
+ $realpath = realpath($this->configuration['dir']);
+
+ if (false === $realpath) {
+ throw new \InvalidArgumentException(sprintf('Failed to resolve configured directory "%s".', $this->configuration['dir']));
+ }
+
+ $this->configuration['dir'] = $realpath;
+ }
+ }
+
protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
{
return new FixerConfigurationResolver([
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Casing/ConstantCaseFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Casing/ConstantCaseFixer.php
index 0095100d..00389a17 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Casing/ConstantCaseFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Casing/ConstantCaseFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\Casing;
use PhpCsFixer\AbstractFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
@@ -29,9 +30,21 @@ use PhpCsFixer\Tokenizer\Tokens;
* Fixer for constants case.
*
* @author Pol Dellaiera
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * case?: 'lower'|'upper'
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * case: 'lower'|'upper'
+ * }
*/
final class ConstantCaseFixer extends AbstractFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
/**
* Hold the function that will be used to convert the constants.
*
@@ -39,19 +52,6 @@ final class ConstantCaseFixer extends AbstractFixer implements ConfigurableFixer
*/
private $fixFunction;
- public function configure(array $configuration): void
- {
- parent::configure($configuration);
-
- if ('lower' === $this->configuration['case']) {
- $this->fixFunction = static fn (string $content): string => strtolower($content);
- }
-
- if ('upper' === $this->configuration['case']) {
- $this->fixFunction = static fn (string $content): string => strtoupper($content);
- }
- }
-
public function getDefinition(): FixerDefinitionInterface
{
return new FixerDefinition(
@@ -68,6 +68,17 @@ final class ConstantCaseFixer extends AbstractFixer implements ConfigurableFixer
return $tokens->isTokenKindFound(T_STRING);
}
+ protected function configurePostNormalisation(): void
+ {
+ if ('lower' === $this->configuration['case']) {
+ $this->fixFunction = static fn (string $content): string => strtolower($content);
+ }
+
+ if ('upper' === $this->configuration['case']) {
+ $this->fixFunction = static fn (string $content): string => strtoupper($content);
+ }
+ }
+
protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
{
return new FixerConfigurationResolver([
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/CastNotation/CastSpacesFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/CastNotation/CastSpacesFixer.php
index bf8c53c3..11ee3732 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/CastNotation/CastSpacesFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/CastNotation/CastSpacesFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\CastNotation;
use PhpCsFixer\AbstractFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
@@ -27,9 +28,21 @@ use PhpCsFixer\Tokenizer\Tokens;
/**
* @author Dariusz Rumiński
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * space?: 'none'|'single'
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * space: 'none'|'single'
+ * }
*/
final class CastSpacesFixer extends AbstractFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
private const INSIDE_CAST_SPACE_REPLACE_MAP = [
' ' => '',
"\t" => '',
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/ClassAttributesSeparationFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/ClassAttributesSeparationFixer.php
index 75de07d4..b5b81a16 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/ClassAttributesSeparationFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/ClassAttributesSeparationFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\ClassNotation;
use PhpCsFixer\AbstractFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
@@ -45,9 +46,21 @@ use Symfony\Component\OptionsResolver\Exception\InvalidOptionsException;
* elements: non-empty-list<_Element>
* }
* @phpstan-type _Element array{token: Token, type: string, index: int, start?: int, end?: int}
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * elements?: array
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * elements: array
+ * }
*/
final class ClassAttributesSeparationFixer extends AbstractFixer implements ConfigurableFixerInterface, WhitespacesAwareFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
/**
* @internal
*/
@@ -65,17 +78,6 @@ final class ClassAttributesSeparationFixer extends AbstractFixer implements Conf
*/
private array $classElementTypes = [];
- public function configure(array $configuration): void
- {
- parent::configure($configuration);
-
- $this->classElementTypes = []; // reset previous configuration
-
- foreach ($this->configuration['elements'] as $elementType => $spacing) {
- $this->classElementTypes[$elementType] = $spacing;
- }
- }
-
public function getDefinition(): FixerDefinitionInterface
{
return new FixerDefinition(
@@ -172,6 +174,15 @@ class Sample
return $tokens->isAnyTokenKindsFound(Token::getClassyTokenKinds());
}
+ protected function configurePostNormalisation(): void
+ {
+ $this->classElementTypes = []; // reset previous configuration
+
+ foreach ($this->configuration['elements'] as $elementType => $spacing) {
+ $this->classElementTypes[$elementType] = $spacing;
+ }
+ }
+
protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
{
foreach ($this->getElementsByClass($tokens) as $class) {
@@ -199,7 +210,7 @@ class Sample
{
return new FixerConfigurationResolver([
(new FixerOptionBuilder('elements', 'Dictionary of `const|method|property|trait_import|case` => `none|one|only_if_meta` values.'))
- ->setAllowedTypes(['string[]'])
+ ->setAllowedTypes(['array'])
->setAllowedValues([static function (array $option): bool {
foreach ($option as $type => $spacing) {
$supportedTypes = ['const', 'method', 'property', 'trait_import', 'case'];
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/ClassDefinitionFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/ClassDefinitionFixer.php
index 1ca054e5..8ff8b030 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/ClassDefinitionFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/ClassDefinitionFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\ClassNotation;
use PhpCsFixer\AbstractFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
@@ -33,9 +34,29 @@ use PhpCsFixer\Tokenizer\TokensAnalyzer;
*
* @phpstan-type _ClassExtendsInfo array{start: int, numberOfExtends: int, multiLine: bool}
* @phpstan-type _ClassImplementsInfo array{start: int, numberOfImplements: int, multiLine: bool}
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * inline_constructor_arguments?: bool,
+ * multi_line_extends_each_single_line?: bool,
+ * single_item_single_line?: bool,
+ * single_line?: bool,
+ * space_before_parenthesis?: bool
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * inline_constructor_arguments: bool,
+ * multi_line_extends_each_single_line: bool,
+ * single_item_single_line: bool,
+ * single_line: bool,
+ * space_before_parenthesis: bool
+ * }
*/
final class ClassDefinitionFixer extends AbstractFixer implements ConfigurableFixerInterface, WhitespacesAwareFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
public function getDefinition(): FixerDefinitionInterface
{
return new FixerDefinition(
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/FinalClassFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/FinalClassFixer.php
index e13cc8f4..c79a1008 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/FinalClassFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/FinalClassFixer.php
@@ -39,7 +39,7 @@ class MyApp {}
.'If you want to subclass a class, mark the parent class as abstract and create two child classes, one empty if necessary: you\'ll gain much more fine grained type-hinting. '
.'If you need to mock a standalone class, create an interface, or maybe it\'s a value-object that shouldn\'t be mocked at all. '
.'If you need to extend a standalone class, create an interface and use the Composite pattern. '
- .'If you aren\'t ready yet for serious OOP, go with FinalInternalClassFixer, it\'s fine.',
+ .'If these rules are too strict for you, you can use `FinalInternalClassFixer` instead.',
'Risky when subclassing non-abstract classes.'
);
}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/FinalInternalClassFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/FinalInternalClassFixer.php
index 991b6164..7ecb8d65 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/FinalInternalClassFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/FinalInternalClassFixer.php
@@ -18,6 +18,7 @@ use PhpCsFixer\AbstractFixer;
use PhpCsFixer\ConfigurationException\InvalidFixerConfigurationException;
use PhpCsFixer\DocBlock\DocBlock;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
@@ -34,9 +35,29 @@ use Symfony\Component\OptionsResolver\Options;
/**
* @author Dariusz Rumiński
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * annotation_exclude?: list,
+ * annotation_include?: list,
+ * consider_absent_docblock_as_internal_class?: bool,
+ * exclude?: list,
+ * include?: list
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * annotation_exclude: array,
+ * annotation_include: array,
+ * consider_absent_docblock_as_internal_class: bool,
+ * exclude: array,
+ * include: array
+ * }
*/
final class FinalInternalClassFixer extends AbstractFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
private const DEFAULTS = [
'include' => [
'internal',
@@ -61,13 +82,6 @@ final class FinalInternalClassFixer extends AbstractFixer implements Configurabl
$this->checkAttributes = \PHP_VERSION_ID >= 8_00_00;
}
- public function configure(array $configuration): void
- {
- parent::configure($configuration);
-
- $this->assertConfigHasNoConflicts();
- }
-
public function getDefinition(): FixerDefinitionInterface
{
return new FixerDefinition(
@@ -108,6 +122,11 @@ final class FinalInternalClassFixer extends AbstractFixer implements Configurabl
return true;
}
+ protected function configurePostNormalisation(): void
+ {
+ $this->assertConfigHasNoConflicts();
+ }
+
protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
{
$tokensAnalyzer = new TokensAnalyzer($tokens);
@@ -131,7 +150,7 @@ final class FinalInternalClassFixer extends AbstractFixer implements Configurabl
{
$annotationsAsserts = [static function (array $values): bool {
foreach ($values as $value) {
- if (!\is_string($value) || '' === $value) {
+ if ('' === $value) {
return false;
}
}
@@ -321,8 +340,7 @@ final class FinalInternalClassFixer extends AbstractFixer implements Configurabl
private function assertConfigHasNoConflicts(): void
{
- foreach (['include', 'exclude'] as $newConfigKey) {
- $oldConfigKey = 'annotation_'.$newConfigKey;
+ foreach (['include' => 'annotation_include', 'exclude' => 'annotation_exclude'] as $newConfigKey => $oldConfigKey) {
$defaults = [];
foreach (self::DEFAULTS[$newConfigKey] as $foo) {
@@ -337,14 +355,14 @@ final class FinalInternalClassFixer extends AbstractFixer implements Configurabl
}
if ($oldConfigIsSet) {
- $this->configuration[$newConfigKey] = $this->configuration[$oldConfigKey];
+ $this->configuration[$newConfigKey] = $this->configuration[$oldConfigKey]; // @phpstan-ignore-line crazy mapping, to be removed while cleaning up deprecated options
$this->checkAttributes = false; // run in old mode
}
// if ($newConfigIsSet) - only new config is set, all good
// if (!$newConfigIsSet && !$oldConfigIsSet) - both are set as to default values, all good
- unset($this->configuration[$oldConfigKey]);
+ unset($this->configuration[$oldConfigKey]); // @phpstan-ignore-line crazy mapping, to be removed while cleaning up deprecated options
}
$intersect = array_intersect_assoc($this->configuration['include'], $this->configuration['exclude']);
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/NoUnneededFinalMethodFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/NoUnneededFinalMethodFixer.php
index 276bdaba..f4f41082 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/NoUnneededFinalMethodFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/NoUnneededFinalMethodFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\ClassNotation;
use PhpCsFixer\AbstractFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
@@ -28,9 +29,21 @@ use PhpCsFixer\Tokenizer\TokensAnalyzer;
/**
* @author Filippo Tessarotto
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * private_methods?: bool
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * private_methods: bool
+ * }
*/
final class NoUnneededFinalMethodFixer extends AbstractFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
public function getDefinition(): FixerDefinitionInterface
{
return new FixerDefinition(
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/OrderedClassElementsFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/OrderedClassElementsFixer.php
index 449be871..af3340c4 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/OrderedClassElementsFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/OrderedClassElementsFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\ClassNotation;
use PhpCsFixer\AbstractFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
@@ -40,9 +41,25 @@ use PhpCsFixer\Utils;
* name: string,
* end: int,
* }
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * case_sensitive?: bool,
+ * order?: list,
+ * sort_algorithm?: 'alpha'|'none'
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * case_sensitive: bool,
+ * order: list,
+ * sort_algorithm: 'alpha'|'none'
+ * }
*/
final class OrderedClassElementsFixer extends AbstractFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
/** @internal */
public const SORT_ALPHA = 'alpha';
@@ -110,50 +127,6 @@ final class OrderedClassElementsFixer extends AbstractFixer implements Configura
*/
private array $typePosition;
- public function configure(array $configuration): void
- {
- parent::configure($configuration);
-
- $this->typePosition = [];
- $position = 0;
-
- foreach ($this->configuration['order'] as $type) {
- $this->typePosition[$type] = $position++;
- }
-
- foreach (self::$typeHierarchy as $type => $parents) {
- if (isset($this->typePosition[$type])) {
- continue;
- }
-
- if (null === $parents) {
- $this->typePosition[$type] = null;
-
- continue;
- }
-
- foreach ($parents as $parent) {
- if (isset($this->typePosition[$parent])) {
- $this->typePosition[$type] = $this->typePosition[$parent];
-
- continue 2;
- }
- }
-
- $this->typePosition[$type] = null;
- }
-
- $lastPosition = \count($this->configuration['order']);
-
- foreach ($this->typePosition as &$pos) {
- if (null === $pos) {
- $pos = $lastPosition;
- }
-
- $pos *= 10; // last digit is used by phpunit method ordering
- }
- }
-
public function isCandidate(Tokens $tokens): bool
{
return $tokens->isAnyTokenKindsFound(Token::getClassyTokenKinds());
@@ -255,6 +228,48 @@ Custom values:
return 65;
}
+ protected function configurePostNormalisation(): void
+ {
+ $this->typePosition = [];
+ $position = 0;
+
+ foreach ($this->configuration['order'] as $type) {
+ $this->typePosition[$type] = $position++;
+ }
+
+ foreach (self::$typeHierarchy as $type => $parents) {
+ if (isset($this->typePosition[$type])) {
+ continue;
+ }
+
+ if (null === $parents) {
+ $this->typePosition[$type] = null;
+
+ continue;
+ }
+
+ foreach ($parents as $parent) {
+ if (isset($this->typePosition[$parent])) {
+ $this->typePosition[$type] = $this->typePosition[$parent];
+
+ continue 2;
+ }
+ }
+
+ $this->typePosition[$type] = null;
+ }
+
+ $lastPosition = \count($this->configuration['order']);
+
+ foreach ($this->typePosition as &$pos) {
+ if (null === $pos) {
+ $pos = $lastPosition;
+ }
+
+ $pos *= 10; // last digit is used by phpunit method ordering
+ }
+ }
+
protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
{
for ($i = 1, $count = $tokens->count(); $i < $count; ++$i) {
@@ -294,7 +309,7 @@ Custom values:
return true;
}
- if (\is_string($value) && 'method:' === substr($value, 0, 7)) {
+ if ('method:' === substr($value, 0, 7)) {
return true;
}
}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/OrderedInterfacesFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/OrderedInterfacesFixer.php
index e5179425..c2589df1 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/OrderedInterfacesFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/OrderedInterfacesFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\ClassNotation;
use PhpCsFixer\AbstractFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
@@ -27,9 +28,25 @@ use PhpCsFixer\Tokenizer\Tokens;
/**
* @author Dave van der Brugge
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * case_sensitive?: bool,
+ * direction?: 'ascend'|'descend',
+ * order?: 'alpha'|'length'
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * case_sensitive: bool,
+ * direction: 'ascend'|'descend',
+ * order: 'alpha'|'length'
+ * }
*/
final class OrderedInterfacesFixer extends AbstractFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
/** @internal */
public const OPTION_DIRECTION = 'direction';
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/OrderedTraitsFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/OrderedTraitsFixer.php
index 417eb126..4d3b6dd7 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/OrderedTraitsFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/OrderedTraitsFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\ClassNotation;
use PhpCsFixer\AbstractFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
@@ -25,8 +26,21 @@ use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
use PhpCsFixer\Tokenizer\CT;
use PhpCsFixer\Tokenizer\Tokens;
+/**
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * case_sensitive?: bool
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * case_sensitive: bool
+ * }
+ */
final class OrderedTraitsFixer extends AbstractFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
public function getDefinition(): FixerDefinitionInterface
{
return new FixerDefinition(
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/OrderedTypesFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/OrderedTypesFixer.php
index df89754a..e70c6baa 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/OrderedTypesFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/OrderedTypesFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\ClassNotation;
use PhpCsFixer\AbstractFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
@@ -34,9 +35,25 @@ use PhpCsFixer\Tokenizer\TokensAnalyzer;
/**
* @author John Paul E. Balandan, CPA
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * case_sensitive?: bool,
+ * null_adjustment?: 'always_first'|'always_last'|'none',
+ * sort_algorithm?: 'alpha'|'none'
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * case_sensitive: bool,
+ * null_adjustment: 'always_first'|'always_last'|'none',
+ * sort_algorithm: 'alpha'|'none'
+ * }
*/
final class OrderedTypesFixer extends AbstractFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
public function getDefinition(): FixerDefinitionInterface
{
return new FixerDefinition(
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/SingleClassElementPerStatementFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/SingleClassElementPerStatementFixer.php
index a75aceab..5b1f781e 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/SingleClassElementPerStatementFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/SingleClassElementPerStatementFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\ClassNotation;
use PhpCsFixer\AbstractFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
use PhpCsFixer\FixerConfiguration\AllowedValueSubset;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
@@ -35,9 +36,21 @@ use PhpCsFixer\Tokenizer\TokensAnalyzer;
*
* @author Javier Spagnoletti
* @author Dariusz Rumiński
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * elements?: list<'const'|'property'>
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * elements: list<'const'|'property'>
+ * }
*/
final class SingleClassElementPerStatementFixer extends AbstractFixer implements ConfigurableFixerInterface, WhitespacesAwareFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
public function isCandidate(Tokens $tokens): bool
{
return $tokens->isAnyTokenKindsFound(Token::getClassyTokenKinds());
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/VisibilityRequiredFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/VisibilityRequiredFixer.php
index 10a637d2..b85f4cf9 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/VisibilityRequiredFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/VisibilityRequiredFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\ClassNotation;
use PhpCsFixer\AbstractFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\AllowedValueSubset;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
@@ -32,9 +33,21 @@ use PhpCsFixer\Tokenizer\TokensAnalyzer;
* Fixer for rules defined in PSR2 ¶4.3, ¶4.5.
*
* @author Dariusz Rumiński
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * elements?: list<'const'|'method'|'property'>
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * elements: list<'const'|'method'|'property'>
+ * }
*/
final class VisibilityRequiredFixer extends AbstractFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
public function getDefinition(): FixerDefinitionInterface
{
return new FixerDefinition(
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Comment/CommentToPhpdocFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Comment/CommentToPhpdocFixer.php
index 3244a168..770814b2 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Comment/CommentToPhpdocFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Comment/CommentToPhpdocFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\Comment;
use PhpCsFixer\AbstractFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
@@ -31,9 +32,21 @@ use PhpCsFixer\Utils;
/**
* @author Kuba Werłos
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * ignored_tags?: list
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * ignored_tags: list
+ * }
*/
final class CommentToPhpdocFixer extends AbstractFixer implements ConfigurableFixerInterface, WhitespacesAwareFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
/**
* @var list
*/
@@ -74,10 +87,8 @@ final class CommentToPhpdocFixer extends AbstractFixer implements ConfigurableFi
);
}
- public function configure(array $configuration): void
+ protected function configurePostNormalisation(): void
{
- parent::configure($configuration);
-
$this->ignoredTags = array_map(
static fn (string $tag): string => strtolower($tag),
$this->configuration['ignored_tags']
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Comment/HeaderCommentFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Comment/HeaderCommentFixer.php
index 1915cf23..cdf0be00 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Comment/HeaderCommentFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Comment/HeaderCommentFixer.php
@@ -17,6 +17,7 @@ namespace PhpCsFixer\Fixer\Comment;
use PhpCsFixer\AbstractFixer;
use PhpCsFixer\ConfigurationException\InvalidFixerConfigurationException;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
@@ -31,9 +32,27 @@ use Symfony\Component\OptionsResolver\Options;
/**
* @author Antonio J. García Lagar
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * comment_type?: 'PHPDoc'|'comment',
+ * header: string,
+ * location?: 'after_declare_strict'|'after_open',
+ * separate?: 'both'|'bottom'|'none'|'top'
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * comment_type: 'PHPDoc'|'comment',
+ * header: string,
+ * location: 'after_declare_strict'|'after_open',
+ * separate: 'both'|'bottom'|'none'|'top'
+ * }
*/
final class HeaderCommentFixer extends AbstractFixer implements ConfigurableFixerInterface, WhitespacesAwareFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
/**
* @internal
*/
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Comment/SingleLineCommentStyleFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Comment/SingleLineCommentStyleFixer.php
index e8f96f84..2fc38dcb 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Comment/SingleLineCommentStyleFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Comment/SingleLineCommentStyleFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\Comment;
use PhpCsFixer\AbstractFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\AllowedValueSubset;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
@@ -29,9 +30,21 @@ use PhpCsFixer\Tokenizer\Tokens;
/**
* @author Filippo Tessarotto
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * comment_types?: list<'asterisk'|'hash'>
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * comment_types: list<'asterisk'|'hash'>
+ * }
*/
final class SingleLineCommentStyleFixer extends AbstractFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
/**
* @var bool
*/
@@ -42,14 +55,6 @@ final class SingleLineCommentStyleFixer extends AbstractFixer implements Configu
*/
private $hashEnabled;
- public function configure(array $configuration): void
- {
- parent::configure($configuration);
-
- $this->asteriskEnabled = \in_array('asterisk', $this->configuration['comment_types'], true);
- $this->hashEnabled = \in_array('hash', $this->configuration['comment_types'], true);
- }
-
public function getDefinition(): FixerDefinitionInterface
{
return new FixerDefinition(
@@ -111,6 +116,12 @@ $c = 3;
return $tokens->isTokenKindFound(T_COMMENT);
}
+ protected function configurePostNormalisation(): void
+ {
+ $this->asteriskEnabled = \in_array('asterisk', $this->configuration['comment_types'], true);
+ $this->hashEnabled = \in_array('hash', $this->configuration['comment_types'], true);
+ }
+
protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
{
foreach ($tokens as $index => $token) {
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ConfigurableFixerInterface.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ConfigurableFixerInterface.php
index 24ce993b..443141c3 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ConfigurableFixerInterface.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ConfigurableFixerInterface.php
@@ -19,6 +19,9 @@ use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
/**
* @author Dariusz Rumiński
+ *
+ * @template TFixerInputConfig of array
+ * @template TFixerComputedConfig of array
*/
interface ConfigurableFixerInterface extends FixerInterface
{
@@ -34,7 +37,7 @@ interface ConfigurableFixerInterface extends FixerInterface
* eg `php_unit_strict` fixer allows to configure which methods should be fixed.
* Finally, some fixers need configuration to work, eg `header_comment`.
*
- * @param array $configuration configuration depends on Fixer
+ * @param TFixerInputConfig $configuration configuration depends on Fixer
*
* @throws InvalidFixerConfigurationException
*/
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ConstantNotation/NativeConstantInvocationFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ConstantNotation/NativeConstantInvocationFixer.php
index 9c900a53..97004379 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ConstantNotation/NativeConstantInvocationFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ConstantNotation/NativeConstantInvocationFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\ConstantNotation;
use PhpCsFixer\AbstractFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
@@ -31,9 +32,29 @@ use Symfony\Component\OptionsResolver\Exception\InvalidOptionsException;
/**
* @author Filippo Tessarotto
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * exclude?: list,
+ * fix_built_in?: bool,
+ * include?: list,
+ * scope?: 'all'|'namespaced',
+ * strict?: bool
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * exclude: list,
+ * fix_built_in: bool,
+ * include: list,
+ * scope: 'all'|'namespaced',
+ * strict: bool
+ * }
*/
final class NativeConstantInvocationFixer extends AbstractFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
/**
* @var array
*/
@@ -113,10 +134,8 @@ namespace {
return true;
}
- public function configure(array $configuration): void
+ protected function configurePostNormalisation(): void
{
- parent::configure($configuration);
-
$uniqueConfiguredExclude = array_unique($this->configuration['exclude']);
// Case-sensitive constants handling
@@ -130,6 +149,7 @@ namespace {
}
}
+ /** @var list */
$constantsToEscape = array_diff(
array_unique($constantsToEscape),
$uniqueConfiguredExclude
@@ -188,7 +208,7 @@ namespace {
{
$constantChecker = static function (array $value): bool {
foreach ($value as $constantName) {
- if (!\is_string($constantName) || '' === trim($constantName) || trim($constantName) !== $constantName) {
+ if (trim($constantName) !== $constantName) {
throw new InvalidOptionsException(sprintf(
'Each element must be a non-empty, trimmed string, got "%s" instead.',
get_debug_type($constantName)
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/ControlStructureContinuationPositionFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/ControlStructureContinuationPositionFixer.php
index a51fa779..95639763 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/ControlStructureContinuationPositionFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/ControlStructureContinuationPositionFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\ControlStructure;
use PhpCsFixer\AbstractFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
@@ -26,8 +27,21 @@ use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
use PhpCsFixer\Tokenizer\Analyzer\WhitespacesAnalyzer;
use PhpCsFixer\Tokenizer\Tokens;
+/**
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * position?: 'next_line'|'same_line'
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * position: 'next_line'|'same_line'
+ * }
+ */
final class ControlStructureContinuationPositionFixer extends AbstractFixer implements ConfigurableFixerInterface, WhitespacesAwareFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
/**
* @internal
*/
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/EmptyLoopBodyFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/EmptyLoopBodyFixer.php
index 54f804fe..03f6a905 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/EmptyLoopBodyFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/EmptyLoopBodyFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\ControlStructure;
use PhpCsFixer\AbstractFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
@@ -26,8 +27,21 @@ use PhpCsFixer\Tokenizer\Token;
use PhpCsFixer\Tokenizer\Tokens;
use PhpCsFixer\Tokenizer\TokensAnalyzer;
+/**
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * style?: 'braces'|'semicolon'
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * style: 'braces'|'semicolon'
+ * }
+ */
final class EmptyLoopBodyFixer extends AbstractFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
private const STYLE_BRACES = 'braces';
private const STYLE_SEMICOLON = 'semicolon';
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/EmptyLoopConditionFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/EmptyLoopConditionFixer.php
index 0e48012b..2feac4ea 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/EmptyLoopConditionFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/EmptyLoopConditionFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\ControlStructure;
use PhpCsFixer\AbstractFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
@@ -25,8 +26,21 @@ use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
use PhpCsFixer\Tokenizer\Token;
use PhpCsFixer\Tokenizer\Tokens;
+/**
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * style?: 'for'|'while'
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * style: 'for'|'while'
+ * }
+ */
final class EmptyLoopConditionFixer extends AbstractFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
private const STYLE_FOR = 'for';
private const STYLE_WHILE = 'while';
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoAlternativeSyntaxFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoAlternativeSyntaxFixer.php
index e994ad92..c0622fd2 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoAlternativeSyntaxFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoAlternativeSyntaxFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\ControlStructure;
use PhpCsFixer\AbstractFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
@@ -27,9 +28,21 @@ use PhpCsFixer\Tokenizer\Tokens;
/**
* @author Eddilbert Macharia
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * fix_non_monolithic_code?: bool
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * fix_non_monolithic_code: bool
+ * }
*/
final class NoAlternativeSyntaxFixer extends AbstractFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
public function getDefinition(): FixerDefinitionInterface
{
return new FixerDefinition(
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoBreakCommentFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoBreakCommentFixer.php
index eca95427..821df86c 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoBreakCommentFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoBreakCommentFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\ControlStructure;
use PhpCsFixer\AbstractFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
@@ -32,9 +33,21 @@ use Symfony\Component\OptionsResolver\Options;
/**
* Fixer for rule defined in PSR2 ¶5.2.
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * comment_text?: string
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * comment_text: string
+ * }
*/
final class NoBreakCommentFixer extends AbstractFixer implements ConfigurableFixerInterface, WhitespacesAwareFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
public function getDefinition(): FixerDefinitionInterface
{
return new FixerDefinition(
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoUnneededBracesFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoUnneededBracesFixer.php
index 3d1e72bc..ce46c859 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoUnneededBracesFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoUnneededBracesFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\ControlStructure;
use PhpCsFixer\AbstractFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
@@ -25,8 +26,21 @@ use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
use PhpCsFixer\Tokenizer\Token;
use PhpCsFixer\Tokenizer\Tokens;
+/**
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * namespaces?: bool
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * namespaces: bool
+ * }
+ */
final class NoUnneededBracesFixer extends AbstractFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
public function getDefinition(): FixerDefinitionInterface
{
return new FixerDefinition(
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoUnneededControlParenthesesFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoUnneededControlParenthesesFixer.php
index 7a2da25b..6b2c3cb1 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoUnneededControlParenthesesFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoUnneededControlParenthesesFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\ControlStructure;
use PhpCsFixer\AbstractFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\AllowedValueSubset;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
@@ -32,9 +33,21 @@ use PhpCsFixer\Tokenizer\TokensAnalyzer;
* @author Sullivan Senechal
* @author Dariusz Rumiński
* @author Gregor Harlan
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * statements?: list<'break'|'clone'|'continue'|'echo_print'|'negative_instanceof'|'others'|'return'|'switch_case'|'yield'|'yield_from'>
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * statements: list<'break'|'clone'|'continue'|'echo_print'|'negative_instanceof'|'others'|'return'|'switch_case'|'yield'|'yield_from'>
+ * }
*/
final class NoUnneededControlParenthesesFixer extends AbstractFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
/**
* @var list
*/
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoUnneededCurlyBracesFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoUnneededCurlyBracesFixer.php
index b71c524b..40610d2a 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoUnneededCurlyBracesFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoUnneededCurlyBracesFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\ControlStructure;
use PhpCsFixer\AbstractProxyFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\Fixer\DeprecatedFixerInterface;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
@@ -25,9 +26,21 @@ use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
/**
* @deprecated
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * namespaces?: bool
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * namespaces: bool
+ * }
*/
final class NoUnneededCurlyBracesFixer extends AbstractProxyFixer implements ConfigurableFixerInterface, DeprecatedFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
private NoUnneededBracesFixer $noUnneededBracesFixer;
public function __construct()
@@ -49,13 +62,6 @@ final class NoUnneededCurlyBracesFixer extends AbstractProxyFixer implements Con
);
}
- public function configure(array $configuration): void
- {
- $this->noUnneededBracesFixer->configure($configuration);
-
- parent::configure($configuration);
- }
-
/**
* {@inheritdoc}
*
@@ -73,6 +79,14 @@ final class NoUnneededCurlyBracesFixer extends AbstractProxyFixer implements Con
];
}
+ /**
+ * @param _AutogeneratedInputConfiguration $configuration
+ */
+ protected function configurePreNormalisation(array $configuration): void
+ {
+ $this->noUnneededBracesFixer->configure($configuration);
+ }
+
protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
{
return new FixerConfigurationResolver([
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/TrailingCommaInMultilineFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/TrailingCommaInMultilineFixer.php
index fb86bc5b..e30f8c63 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/TrailingCommaInMultilineFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/TrailingCommaInMultilineFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\ControlStructure;
use PhpCsFixer\AbstractFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\AllowedValueSubset;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
@@ -36,9 +37,23 @@ use Symfony\Component\OptionsResolver\Options;
* @author Sebastiaan Stok
* @author Dariusz Rumiński
* @author Kuba Werłos
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * after_heredoc?: bool,
+ * elements?: list<'arguments'|'arrays'|'match'|'parameters'>
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * after_heredoc: bool,
+ * elements: list<'arguments'|'arrays'|'match'|'parameters'>
+ * }
*/
final class TrailingCommaInMultilineFixer extends AbstractFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
/**
* @internal
*/
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/YodaStyleFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/YodaStyleFixer.php
index c8005f1b..c1a2b132 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/YodaStyleFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/YodaStyleFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\ControlStructure;
use PhpCsFixer\AbstractFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
@@ -30,9 +31,27 @@ use PhpCsFixer\Tokenizer\TokensAnalyzer;
/**
* @author Bram Gotink
* @author Dariusz Rumiński
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * always_move_variable?: bool,
+ * equal?: bool|null,
+ * identical?: bool|null,
+ * less_and_greater?: bool|null
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * always_move_variable: bool,
+ * equal: bool|null,
+ * identical: bool|null,
+ * less_and_greater: bool|null
+ * }
*/
final class YodaStyleFixer extends AbstractFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
/**
* @var array
*/
@@ -48,13 +67,6 @@ final class YodaStyleFixer extends AbstractFixer implements ConfigurableFixerInt
*/
private $candidateTypes;
- public function configure(array $configuration): void
- {
- parent::configure($configuration);
-
- $this->resolveConfiguration();
- }
-
public function getDefinition(): FixerDefinitionInterface
{
return new FixerDefinition(
@@ -119,6 +131,11 @@ return $foo === count($bar);
return $tokens->isAnyTokenKindsFound($this->candidateTypes);
}
+ protected function configurePostNormalisation(): void
+ {
+ $this->resolveConfiguration();
+ }
+
protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
{
$this->fixTokens($tokens);
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/DoctrineAnnotation/DoctrineAnnotationArrayAssignmentFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/DoctrineAnnotation/DoctrineAnnotationArrayAssignmentFixer.php
index d4801c45..d3158f54 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/DoctrineAnnotation/DoctrineAnnotationArrayAssignmentFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/DoctrineAnnotation/DoctrineAnnotationArrayAssignmentFixer.php
@@ -17,6 +17,8 @@ namespace PhpCsFixer\Fixer\DoctrineAnnotation;
use PhpCsFixer\AbstractDoctrineAnnotationFixer;
use PhpCsFixer\Doctrine\Annotation\DocLexer;
use PhpCsFixer\Doctrine\Annotation\Tokens;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
@@ -26,9 +28,23 @@ use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
/**
* Forces the configured operator for assignment in arrays in Doctrine Annotations.
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * ignored_tags?: list,
+ * operator?: ':'|'='
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * ignored_tags: list,
+ * operator: ':'|'='
+ * }
*/
-final class DoctrineAnnotationArrayAssignmentFixer extends AbstractDoctrineAnnotationFixer
+final class DoctrineAnnotationArrayAssignmentFixer extends AbstractDoctrineAnnotationFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
public function getDefinition(): FixerDefinitionInterface
{
return new FixerDefinition(
@@ -59,8 +75,7 @@ final class DoctrineAnnotationArrayAssignmentFixer extends AbstractDoctrineAnnot
{
$options = parent::createConfigurationDefinition()->getOptions();
- $operator = new FixerOptionBuilder('operator', 'The operator to use.');
- $options[] = $operator
+ $options[] = (new FixerOptionBuilder('operator', 'The operator to use.'))
->setAllowedValues(['=', ':'])
->setDefault('=')
->getOption()
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/DoctrineAnnotation/DoctrineAnnotationBracesFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/DoctrineAnnotation/DoctrineAnnotationBracesFixer.php
index ead0fb69..928254a2 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/DoctrineAnnotation/DoctrineAnnotationBracesFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/DoctrineAnnotation/DoctrineAnnotationBracesFixer.php
@@ -18,6 +18,8 @@ use PhpCsFixer\AbstractDoctrineAnnotationFixer;
use PhpCsFixer\Doctrine\Annotation\DocLexer;
use PhpCsFixer\Doctrine\Annotation\Token;
use PhpCsFixer\Doctrine\Annotation\Tokens;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
@@ -27,9 +29,23 @@ use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
/**
* Adds braces to Doctrine annotations when missing.
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * ignored_tags?: list,
+ * syntax?: 'with_braces'|'without_braces'
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * ignored_tags: list,
+ * syntax: 'with_braces'|'without_braces'
+ * }
*/
-final class DoctrineAnnotationBracesFixer extends AbstractDoctrineAnnotationFixer
+final class DoctrineAnnotationBracesFixer extends AbstractDoctrineAnnotationFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
public function getDefinition(): FixerDefinitionInterface
{
return new FixerDefinition(
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/DoctrineAnnotation/DoctrineAnnotationIndentationFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/DoctrineAnnotation/DoctrineAnnotationIndentationFixer.php
index 58ae532b..c9c01e01 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/DoctrineAnnotation/DoctrineAnnotationIndentationFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/DoctrineAnnotation/DoctrineAnnotationIndentationFixer.php
@@ -17,6 +17,8 @@ namespace PhpCsFixer\Fixer\DoctrineAnnotation;
use PhpCsFixer\AbstractDoctrineAnnotationFixer;
use PhpCsFixer\Doctrine\Annotation\DocLexer;
use PhpCsFixer\Doctrine\Annotation\Tokens;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
@@ -25,8 +27,23 @@ use PhpCsFixer\FixerDefinition\FixerDefinition;
use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
use PhpCsFixer\Preg;
-final class DoctrineAnnotationIndentationFixer extends AbstractDoctrineAnnotationFixer
+/**
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * ignored_tags?: list,
+ * indent_mixed_lines?: bool
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * ignored_tags: list,
+ * indent_mixed_lines: bool
+ * }
+ */
+final class DoctrineAnnotationIndentationFixer extends AbstractDoctrineAnnotationFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
public function getDefinition(): FixerDefinitionInterface
{
return new FixerDefinition(
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/DoctrineAnnotation/DoctrineAnnotationSpacesFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/DoctrineAnnotation/DoctrineAnnotationSpacesFixer.php
index 0ee08482..e39fe008 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/DoctrineAnnotation/DoctrineAnnotationSpacesFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/DoctrineAnnotation/DoctrineAnnotationSpacesFixer.php
@@ -18,6 +18,8 @@ use PhpCsFixer\AbstractDoctrineAnnotationFixer;
use PhpCsFixer\Doctrine\Annotation\DocLexer;
use PhpCsFixer\Doctrine\Annotation\Token;
use PhpCsFixer\Doctrine\Annotation\Tokens;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
@@ -28,9 +30,37 @@ use PhpCsFixer\Preg;
/**
* Fixes spaces around commas and assignment operators in Doctrine annotations.
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * after_argument_assignments?: bool|null,
+ * after_array_assignments_colon?: bool|null,
+ * after_array_assignments_equals?: bool|null,
+ * around_commas?: bool,
+ * around_parentheses?: bool,
+ * before_argument_assignments?: bool|null,
+ * before_array_assignments_colon?: bool|null,
+ * before_array_assignments_equals?: bool|null,
+ * ignored_tags?: list
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * after_argument_assignments: bool|null,
+ * after_array_assignments_colon: bool|null,
+ * after_array_assignments_equals: bool|null,
+ * around_commas: bool,
+ * around_parentheses: bool,
+ * before_argument_assignments: bool|null,
+ * before_array_assignments_colon: bool|null,
+ * before_array_assignments_equals: bool|null,
+ * ignored_tags: list
+ * }
*/
-final class DoctrineAnnotationSpacesFixer extends AbstractDoctrineAnnotationFixer
+final class DoctrineAnnotationSpacesFixer extends AbstractDoctrineAnnotationFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
public function getDefinition(): FixerDefinitionInterface
{
return new FixerDefinition(
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/FopenFlagsFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/FopenFlagsFixer.php
index a136c7b3..b363dc87 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/FopenFlagsFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/FopenFlagsFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\FunctionNotation;
use PhpCsFixer\AbstractFopenFlagFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
@@ -25,8 +26,21 @@ use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
use PhpCsFixer\Tokenizer\Token;
use PhpCsFixer\Tokenizer\Tokens;
+/**
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * b_mode?: bool
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * b_mode: bool
+ * }
+ */
final class FopenFlagsFixer extends AbstractFopenFlagFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
public function getDefinition(): FixerDefinitionInterface
{
return new FixerDefinition(
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/FunctionDeclarationFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/FunctionDeclarationFixer.php
index 8e63c816..2f200630 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/FunctionDeclarationFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/FunctionDeclarationFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\FunctionNotation;
use PhpCsFixer\AbstractFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
@@ -30,9 +31,25 @@ use PhpCsFixer\Tokenizer\TokensAnalyzer;
* Fixer for rules defined in PSR2 generally (¶1 and ¶6).
*
* @author Dariusz Rumiński
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * closure_fn_spacing?: 'none'|'one',
+ * closure_function_spacing?: 'none'|'one',
+ * trailing_comma_single_line?: bool
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * closure_fn_spacing: 'none'|'one',
+ * closure_function_spacing: 'none'|'one',
+ * trailing_comma_single_line: bool
+ * }
*/
final class FunctionDeclarationFixer extends AbstractFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
/**
* @internal
*/
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/MethodArgumentSpaceFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/MethodArgumentSpaceFixer.php
index 2b6e3f2c..612fa4b7 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/MethodArgumentSpaceFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/MethodArgumentSpaceFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\FunctionNotation;
use PhpCsFixer\AbstractFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
@@ -30,9 +31,27 @@ use PhpCsFixer\Tokenizer\Tokens;
/**
* @author Kuanhung Chen
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * after_heredoc?: bool,
+ * attribute_placement?: 'ignore'|'same_line'|'standalone',
+ * keep_multiple_spaces_after_comma?: bool,
+ * on_multiline?: 'ensure_fully_multiline'|'ensure_single_line'|'ignore'
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * after_heredoc: bool,
+ * attribute_placement: 'ignore'|'same_line'|'standalone',
+ * keep_multiple_spaces_after_comma: bool,
+ * on_multiline: 'ensure_fully_multiline'|'ensure_single_line'|'ignore'
+ * }
*/
final class MethodArgumentSpaceFixer extends AbstractFixer implements ConfigurableFixerInterface, WhitespacesAwareFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
public function getDefinition(): FixerDefinitionInterface
{
return new FixerDefinition(
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/NativeFunctionInvocationFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/NativeFunctionInvocationFixer.php
index a4e71406..f13cfd65 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/NativeFunctionInvocationFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/NativeFunctionInvocationFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\FunctionNotation;
use PhpCsFixer\AbstractFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
@@ -31,9 +32,27 @@ use Symfony\Component\OptionsResolver\Exception\InvalidOptionsException;
/**
* @author Andreas Möller
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * exclude?: list,
+ * include?: list,
+ * scope?: 'all'|'namespaced',
+ * strict?: bool
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * exclude: list,
+ * include: list,
+ * scope: 'all'|'namespaced',
+ * strict: bool
+ * }
*/
final class NativeFunctionInvocationFixer extends AbstractFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
/**
* @internal
*/
@@ -61,13 +80,6 @@ final class NativeFunctionInvocationFixer extends AbstractFixer implements Confi
*/
private $functionFilter;
- public function configure(array $configuration): void
- {
- parent::configure($configuration);
-
- $this->functionFilter = $this->getFunctionFilter();
- }
-
public function getDefinition(): FixerDefinitionInterface
{
return new FixerDefinition(
@@ -181,6 +193,11 @@ $c = get_class($d);
return true;
}
+ protected function configurePostNormalisation(): void
+ {
+ $this->functionFilter = $this->getFunctionFilter();
+ }
+
protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
{
if ('all' === $this->configuration['scope']) {
@@ -205,7 +222,7 @@ $c = get_class($d);
->setAllowedTypes(['string[]'])
->setAllowedValues([static function (array $value): bool {
foreach ($value as $functionName) {
- if (!\is_string($functionName) || '' === trim($functionName) || trim($functionName) !== $functionName) {
+ if ('' === trim($functionName) || trim($functionName) !== $functionName) {
throw new InvalidOptionsException(sprintf(
'Each element must be a non-empty, trimmed string, got "%s" instead.',
get_debug_type($functionName)
@@ -221,7 +238,7 @@ $c = get_class($d);
->setAllowedTypes(['string[]'])
->setAllowedValues([static function (array $value): bool {
foreach ($value as $functionName) {
- if (!\is_string($functionName) || '' === trim($functionName) || trim($functionName) !== $functionName) {
+ if ('' === trim($functionName) || trim($functionName) !== $functionName) {
throw new InvalidOptionsException(sprintf(
'Each element must be a non-empty, trimmed string, got "%s" instead.',
get_debug_type($functionName)
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/NullableTypeDeclarationForDefaultNullValueFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/NullableTypeDeclarationForDefaultNullValueFixer.php
index efebad87..b21a9ea5 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/NullableTypeDeclarationForDefaultNullValueFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/NullableTypeDeclarationForDefaultNullValueFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\FunctionNotation;
use PhpCsFixer\AbstractFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
@@ -33,9 +34,21 @@ use PhpCsFixer\Tokenizer\Tokens;
/**
* @author HypeMC
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * use_nullable_type_declaration?: bool
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * use_nullable_type_declaration: bool
+ * }
*/
final class NullableTypeDeclarationForDefaultNullValueFixer extends AbstractFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
public function getDefinition(): FixerDefinitionInterface
{
return new FixerDefinition(
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/PhpdocToParamTypeFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/PhpdocToParamTypeFixer.php
index 603051f2..6d1b78bd 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/PhpdocToParamTypeFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/PhpdocToParamTypeFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\FunctionNotation;
use PhpCsFixer\AbstractPhpdocToTypeDeclarationFixer;
use PhpCsFixer\DocBlock\Annotation;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
use PhpCsFixer\Fixer\ExperimentalFixerInterface;
use PhpCsFixer\FixerDefinition\CodeSample;
use PhpCsFixer\FixerDefinition\FixerDefinition;
@@ -25,8 +26,19 @@ use PhpCsFixer\Tokenizer\Tokens;
/**
* @author Jan Gantzert
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * scalar_types?: bool,
+ * union_types?: bool
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * scalar_types: bool,
+ * union_types: bool
+ * }
*/
-final class PhpdocToParamTypeFixer extends AbstractPhpdocToTypeDeclarationFixer implements ExperimentalFixerInterface
+final class PhpdocToParamTypeFixer extends AbstractPhpdocToTypeDeclarationFixer implements ConfigurableFixerInterface, ExperimentalFixerInterface
{
private const TYPE_CHECK_TEMPLATE = '
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * scalar_types?: bool,
+ * union_types?: bool
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * scalar_types: bool,
+ * union_types: bool
+ * }
*/
-final class PhpdocToPropertyTypeFixer extends AbstractPhpdocToTypeDeclarationFixer implements ExperimentalFixerInterface
+final class PhpdocToPropertyTypeFixer extends AbstractPhpdocToTypeDeclarationFixer implements ConfigurableFixerInterface, ExperimentalFixerInterface
{
private const TYPE_CHECK_TEMPLATE = '
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * scalar_types?: bool,
+ * union_types?: bool
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * scalar_types: bool,
+ * union_types: bool
+ * }
*/
-final class PhpdocToReturnTypeFixer extends AbstractPhpdocToTypeDeclarationFixer implements ExperimentalFixerInterface
+final class PhpdocToReturnTypeFixer extends AbstractPhpdocToTypeDeclarationFixer implements ConfigurableFixerInterface, ExperimentalFixerInterface
{
private const TYPE_CHECK_TEMPLATE = '
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * space_before?: 'none'|'one'
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * space_before: 'none'|'one'
+ * }
*/
final class ReturnTypeDeclarationFixer extends AbstractFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
public function getDefinition(): FixerDefinitionInterface
{
return new FixerDefinition(
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Import/FullyQualifiedStrictTypesFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Import/FullyQualifiedStrictTypesFixer.php
index a58f6998..c5f5d6ae 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Import/FullyQualifiedStrictTypesFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Import/FullyQualifiedStrictTypesFixer.php
@@ -17,6 +17,7 @@ namespace PhpCsFixer\Fixer\Import;
use PhpCsFixer\AbstractFixer;
use PhpCsFixer\DocBlock\TypeExpression;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
@@ -40,9 +41,25 @@ use PhpCsFixer\Tokenizer\Tokens;
* @author Greg Korba
* @author SpacePossum
* @author Michael Vorisek
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * import_symbols?: bool,
+ * leading_backslash_in_global_namespace?: bool,
+ * phpdoc_tags?: list
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * import_symbols: bool,
+ * leading_backslash_in_global_namespace: bool,
+ * phpdoc_tags: list
+ * }
*/
final class FullyQualifiedStrictTypesFixer extends AbstractFixer implements ConfigurableFixerInterface, WhitespacesAwareFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
private const REGEX_CLASS = '(?:\\\?+'.TypeExpression::REGEX_IDENTIFIER
.'(\\\\'.TypeExpression::REGEX_IDENTIFIER.')*+)';
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Import/GlobalNamespaceImportFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Import/GlobalNamespaceImportFixer.php
index 44937535..56f7704f 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Import/GlobalNamespaceImportFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Import/GlobalNamespaceImportFixer.php
@@ -18,6 +18,7 @@ use PhpCsFixer\AbstractFixer;
use PhpCsFixer\DocBlock\Annotation;
use PhpCsFixer\DocBlock\DocBlock;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
@@ -38,9 +39,25 @@ use PhpCsFixer\Tokenizer\TokensAnalyzer;
/**
* @author Gregor Harlan
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * import_classes?: bool|null,
+ * import_constants?: bool|null,
+ * import_functions?: bool|null
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * import_classes: bool|null,
+ * import_constants: bool|null,
+ * import_functions: bool|null
+ * }
*/
final class GlobalNamespaceImportFixer extends AbstractFixer implements ConfigurableFixerInterface, WhitespacesAwareFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
private ImportProcessor $importProcessor;
public function __construct()
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Import/GroupImportFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Import/GroupImportFixer.php
index 1d47b274..0999993a 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Import/GroupImportFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Import/GroupImportFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\Import;
use PhpCsFixer\AbstractFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
@@ -33,9 +34,21 @@ use Symfony\Component\OptionsResolver\Exception\InvalidOptionsException;
/**
* @author Volodymyr Kupriienko
* @author Greg Korba
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * group_types?: list
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * group_types: list
+ * }
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
*/
final class GroupImportFixer extends AbstractFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
/** @internal */
public const GROUP_CLASSY = 'classy';
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Import/OrderedImportsFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Import/OrderedImportsFixer.php
index c488576f..0bf2560a 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Import/OrderedImportsFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Import/OrderedImportsFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\Import;
use PhpCsFixer\AbstractFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
@@ -44,9 +45,25 @@ use Symfony\Component\OptionsResolver\Exception\InvalidOptionsException;
* importType: self::IMPORT_TYPE_*,
* group: bool,
* }
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * case_sensitive?: bool,
+ * imports_order?: list|null,
+ * sort_algorithm?: 'alpha'|'length'|'none'
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * case_sensitive: bool,
+ * imports_order: list|null,
+ * sort_algorithm: 'alpha'|'length'|'none'
+ * }
*/
final class OrderedImportsFixer extends AbstractFixer implements ConfigurableFixerInterface, WhitespacesAwareFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
/**
* @internal
*/
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Import/SingleImportPerStatementFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Import/SingleImportPerStatementFixer.php
index f10e93db..a344fe44 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Import/SingleImportPerStatementFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Import/SingleImportPerStatementFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\Import;
use PhpCsFixer\AbstractFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
@@ -33,9 +34,21 @@ use PhpCsFixer\Tokenizer\TokensAnalyzer;
* Fixer for rules defined in PSR2 ¶3.
*
* @author Dariusz Rumiński
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * group_to_single_imports?: bool
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * group_to_single_imports: bool
+ * }
*/
final class SingleImportPerStatementFixer extends AbstractFixer implements ConfigurableFixerInterface, WhitespacesAwareFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
public function getDefinition(): FixerDefinitionInterface
{
return new FixerDefinition(
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/DeclareEqualNormalizeFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/DeclareEqualNormalizeFixer.php
index ae7c9ea4..442ee723 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/DeclareEqualNormalizeFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/DeclareEqualNormalizeFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\LanguageConstruct;
use PhpCsFixer\AbstractFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
@@ -27,9 +28,21 @@ use PhpCsFixer\Tokenizer\Tokens;
/**
* @author Dariusz Rumiński
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * space?: 'none'|'single'
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * space: 'none'|'single'
+ * }
*/
final class DeclareEqualNormalizeFixer extends AbstractFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
public function getDefinition(): FixerDefinitionInterface
{
return new FixerDefinition(
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/ErrorSuppressionFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/ErrorSuppressionFixer.php
index 0c108335..551d8e33 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/ErrorSuppressionFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/ErrorSuppressionFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\LanguageConstruct;
use PhpCsFixer\AbstractFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
@@ -29,9 +30,25 @@ use PhpCsFixer\Tokenizer\Tokens;
/**
* @author Jules Pietri
* @author Kuba Werłos
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * mute_deprecation_error?: bool,
+ * noise_remaining_usages?: bool,
+ * noise_remaining_usages_exclude?: list
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * mute_deprecation_error: bool,
+ * noise_remaining_usages: bool,
+ * noise_remaining_usages_exclude: list
+ * }
*/
final class ErrorSuppressionFixer extends AbstractFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
/**
* @internal
*/
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/FunctionToConstantFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/FunctionToConstantFixer.php
index a2041ac1..a182616d 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/FunctionToConstantFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/FunctionToConstantFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\LanguageConstruct;
use PhpCsFixer\AbstractFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\AllowedValueSubset;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
@@ -28,8 +29,21 @@ use PhpCsFixer\Tokenizer\CT;
use PhpCsFixer\Tokenizer\Token;
use PhpCsFixer\Tokenizer\Tokens;
+/**
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * functions?: list<'get_called_class'|'get_class'|'get_class_this'|'php_sapi_name'|'phpversion'|'pi'>
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * functions: list<'get_called_class'|'get_class'|'get_class_this'|'php_sapi_name'|'phpversion'|'pi'>
+ * }
+ */
final class FunctionToConstantFixer extends AbstractFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
/**
* @var array>
*/
@@ -68,17 +82,6 @@ final class FunctionToConstantFixer extends AbstractFixer implements Configurabl
parent::__construct();
}
- public function configure(array $configuration): void
- {
- parent::configure($configuration);
-
- $this->functionsFixMap = [];
-
- foreach ($this->configuration['functions'] as $key) {
- $this->functionsFixMap[$key] = self::$availableFunctions[$key];
- }
- }
-
public function getDefinition(): FixerDefinitionInterface
{
return new FixerDefinition(
@@ -118,6 +121,15 @@ final class FunctionToConstantFixer extends AbstractFixer implements Configurabl
return true;
}
+ protected function configurePostNormalisation(): void
+ {
+ $this->functionsFixMap = [];
+
+ foreach ($this->configuration['functions'] as $key) {
+ $this->functionsFixMap[$key] = self::$availableFunctions[$key];
+ }
+ }
+
protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
{
$functionAnalyzer = new FunctionsAnalyzer();
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/NullableTypeDeclarationFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/NullableTypeDeclarationFixer.php
index a7b65432..ba4a70e2 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/NullableTypeDeclarationFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/NullableTypeDeclarationFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\LanguageConstruct;
use PhpCsFixer\AbstractFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
@@ -33,9 +34,21 @@ use PhpCsFixer\Tokenizer\TokensAnalyzer;
/**
* @author John Paul E. Balandan, CPA
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * syntax?: 'question_mark'|'union'
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * syntax: 'question_mark'|'union'
+ * }
*/
final class NullableTypeDeclarationFixer extends AbstractFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
private const OPTION_SYNTAX_UNION = 'union';
private const OPTION_SYNTAX_QUESTION_MARK = 'question_mark';
@@ -88,10 +101,8 @@ class ValueObject
return 2;
}
- public function configure(array $configuration): void
+ protected function configurePostNormalisation(): void
{
- parent::configure($configuration);
-
$this->candidateTokenKind = self::OPTION_SYNTAX_QUESTION_MARK === $this->configuration['syntax']
? CT::T_TYPE_ALTERNATION // `|` -> `?`
: CT::T_NULLABLE_TYPE; // `?` -> `|`
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/SingleSpaceAfterConstructFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/SingleSpaceAfterConstructFixer.php
index 6bced514..7ca0c4e3 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/SingleSpaceAfterConstructFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/SingleSpaceAfterConstructFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\LanguageConstruct;
use PhpCsFixer\AbstractProxyFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\Fixer\DeprecatedFixerInterface;
use PhpCsFixer\FixerConfiguration\AllowedValueSubset;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
@@ -30,9 +31,21 @@ use PhpCsFixer\Tokenizer\CT;
* @author Andreas Möller
*
* @deprecated
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * constructs?: list<'abstract'|'as'|'attribute'|'break'|'case'|'catch'|'class'|'clone'|'comment'|'const'|'const_import'|'continue'|'do'|'echo'|'else'|'elseif'|'enum'|'extends'|'final'|'finally'|'for'|'foreach'|'function'|'function_import'|'global'|'goto'|'if'|'implements'|'include'|'include_once'|'instanceof'|'insteadof'|'interface'|'match'|'named_argument'|'namespace'|'new'|'open_tag_with_echo'|'php_doc'|'php_open'|'print'|'private'|'protected'|'public'|'readonly'|'require'|'require_once'|'return'|'static'|'switch'|'throw'|'trait'|'try'|'type_colon'|'use'|'use_lambda'|'use_trait'|'var'|'while'|'yield'|'yield_from'>
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * constructs: list<'abstract'|'as'|'attribute'|'break'|'case'|'catch'|'class'|'clone'|'comment'|'const'|'const_import'|'continue'|'do'|'echo'|'else'|'elseif'|'enum'|'extends'|'final'|'finally'|'for'|'foreach'|'function'|'function_import'|'global'|'goto'|'if'|'implements'|'include'|'include_once'|'instanceof'|'insteadof'|'interface'|'match'|'named_argument'|'namespace'|'new'|'open_tag_with_echo'|'php_doc'|'php_open'|'print'|'private'|'protected'|'public'|'readonly'|'require'|'require_once'|'return'|'static'|'switch'|'throw'|'trait'|'try'|'type_colon'|'use'|'use_lambda'|'use_trait'|'var'|'while'|'yield'|'yield_from'>
+ * }
*/
final class SingleSpaceAfterConstructFixer extends AbstractProxyFixer implements ConfigurableFixerInterface, DeprecatedFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
/**
* @var array
*/
@@ -114,19 +127,6 @@ final class SingleSpaceAfterConstructFixer extends AbstractProxyFixer implements
return array_keys($this->proxyFixers);
}
- public function configure(array $configuration): void
- {
- parent::configure($configuration);
-
- $this->singleSpaceAroundConstructFixer->configure([
- 'constructs_contain_a_single_space' => [
- 'yield_from',
- ],
- 'constructs_preceded_by_a_single_space' => [],
- 'constructs_followed_by_a_single_space' => $this->configuration['constructs'],
- ]);
- }
-
public function getDefinition(): FixerDefinitionInterface
{
return new FixerDefinition(
@@ -175,6 +175,17 @@ yield from baz();
return parent::getPriority();
}
+ protected function configurePostNormalisation(): void
+ {
+ $this->singleSpaceAroundConstructFixer->configure([
+ 'constructs_contain_a_single_space' => [
+ 'yield_from',
+ ],
+ 'constructs_preceded_by_a_single_space' => [],
+ 'constructs_followed_by_a_single_space' => $this->configuration['constructs'],
+ ]);
+ }
+
protected function createProxyFixers(): array
{
return [$this->singleSpaceAroundConstructFixer];
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/SingleSpaceAroundConstructFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/SingleSpaceAroundConstructFixer.php
index 0536d886..ac535cef 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/SingleSpaceAroundConstructFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/SingleSpaceAroundConstructFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\LanguageConstruct;
use PhpCsFixer\AbstractFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\AllowedValueSubset;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
@@ -31,9 +32,25 @@ use PhpCsFixer\Tokenizer\Tokens;
/**
* @author Andreas Möller
* @author Dariusz Rumiński
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * constructs_contain_a_single_space?: list<'yield_from'>,
+ * constructs_followed_by_a_single_space?: list<'abstract'|'as'|'attribute'|'break'|'case'|'catch'|'class'|'clone'|'comment'|'const'|'const_import'|'continue'|'do'|'echo'|'else'|'elseif'|'enum'|'extends'|'final'|'finally'|'for'|'foreach'|'function'|'function_import'|'global'|'goto'|'if'|'implements'|'include'|'include_once'|'instanceof'|'insteadof'|'interface'|'match'|'named_argument'|'namespace'|'new'|'open_tag_with_echo'|'php_doc'|'php_open'|'print'|'private'|'protected'|'public'|'readonly'|'require'|'require_once'|'return'|'static'|'switch'|'throw'|'trait'|'try'|'type_colon'|'use'|'use_lambda'|'use_trait'|'var'|'while'|'yield'|'yield_from'>,
+ * constructs_preceded_by_a_single_space?: list<'as'|'use_lambda'>
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * constructs_contain_a_single_space: list<'yield_from'>,
+ * constructs_followed_by_a_single_space: list<'abstract'|'as'|'attribute'|'break'|'case'|'catch'|'class'|'clone'|'comment'|'const'|'const_import'|'continue'|'do'|'echo'|'else'|'elseif'|'enum'|'extends'|'final'|'finally'|'for'|'foreach'|'function'|'function_import'|'global'|'goto'|'if'|'implements'|'include'|'include_once'|'instanceof'|'insteadof'|'interface'|'match'|'named_argument'|'namespace'|'new'|'open_tag_with_echo'|'php_doc'|'php_open'|'print'|'private'|'protected'|'public'|'readonly'|'require'|'require_once'|'return'|'static'|'switch'|'throw'|'trait'|'try'|'type_colon'|'use'|'use_lambda'|'use_trait'|'var'|'while'|'yield'|'yield_from'>,
+ * constructs_preceded_by_a_single_space: list<'as'|'use_lambda'>
+ * }
*/
final class SingleSpaceAroundConstructFixer extends AbstractFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
/**
* @var array
*/
@@ -132,59 +149,6 @@ final class SingleSpaceAroundConstructFixer extends AbstractFixer implements Con
*/
private array $fixTokenMapPrecededByASingleSpace = [];
- public function configure(array $configuration): void
- {
- parent::configure($configuration);
-
- if (\defined('T_MATCH')) { // @TODO: drop condition when PHP 8.0+ is required
- self::$tokenMapFollowedByASingleSpace['match'] = T_MATCH;
- }
-
- if (\defined('T_READONLY')) { // @TODO: drop condition when PHP 8.1+ is required
- self::$tokenMapFollowedByASingleSpace['readonly'] = T_READONLY;
- }
-
- if (\defined('T_ENUM')) { // @TODO: drop condition when PHP 8.1+ is required
- self::$tokenMapFollowedByASingleSpace['enum'] = T_ENUM;
- }
-
- $this->fixTokenMapContainASingleSpace = [];
-
- foreach ($this->configuration['constructs_contain_a_single_space'] as $key) {
- if (null !== self::$tokenMapContainASingleSpace[$key]) {
- $this->fixTokenMapContainASingleSpace[$key] = self::$tokenMapContainASingleSpace[$key];
- }
- }
-
- $this->fixTokenMapPrecededByASingleSpace = [];
-
- foreach ($this->configuration['constructs_preceded_by_a_single_space'] as $key) {
- if (null !== self::$tokenMapPrecededByASingleSpace[$key]) {
- $this->fixTokenMapPrecededByASingleSpace[$key] = self::$tokenMapPrecededByASingleSpace[$key];
- }
- }
-
- $this->fixTokenMapFollowedByASingleSpace = [];
-
- foreach ($this->configuration['constructs_followed_by_a_single_space'] as $key) {
- if (null !== self::$tokenMapFollowedByASingleSpace[$key]) {
- $this->fixTokenMapFollowedByASingleSpace[$key] = self::$tokenMapFollowedByASingleSpace[$key];
- }
- }
-
- if (isset($this->fixTokenMapFollowedByASingleSpace['public'])) {
- $this->fixTokenMapFollowedByASingleSpace['constructor_public'] = CT::T_CONSTRUCTOR_PROPERTY_PROMOTION_PUBLIC;
- }
-
- if (isset($this->fixTokenMapFollowedByASingleSpace['protected'])) {
- $this->fixTokenMapFollowedByASingleSpace['constructor_protected'] = CT::T_CONSTRUCTOR_PROPERTY_PROMOTION_PROTECTED;
- }
-
- if (isset($this->fixTokenMapFollowedByASingleSpace['private'])) {
- $this->fixTokenMapFollowedByASingleSpace['constructor_private'] = CT::T_CONSTRUCTOR_PROPERTY_PROMOTION_PRIVATE;
- }
- }
-
public function getDefinition(): FixerDefinitionInterface
{
return new FixerDefinition(
@@ -274,6 +238,57 @@ yield from baz();
return $tokens->isAnyTokenKindsFound($tokenKinds) && !$tokens->hasAlternativeSyntax();
}
+ protected function configurePostNormalisation(): void
+ {
+ if (\defined('T_MATCH')) { // @TODO: drop condition when PHP 8.0+ is required
+ self::$tokenMapFollowedByASingleSpace['match'] = T_MATCH;
+ }
+
+ if (\defined('T_READONLY')) { // @TODO: drop condition when PHP 8.1+ is required
+ self::$tokenMapFollowedByASingleSpace['readonly'] = T_READONLY;
+ }
+
+ if (\defined('T_ENUM')) { // @TODO: drop condition when PHP 8.1+ is required
+ self::$tokenMapFollowedByASingleSpace['enum'] = T_ENUM;
+ }
+
+ $this->fixTokenMapContainASingleSpace = [];
+
+ foreach ($this->configuration['constructs_contain_a_single_space'] as $key) {
+ if (null !== self::$tokenMapContainASingleSpace[$key]) {
+ $this->fixTokenMapContainASingleSpace[$key] = self::$tokenMapContainASingleSpace[$key];
+ }
+ }
+
+ $this->fixTokenMapPrecededByASingleSpace = [];
+
+ foreach ($this->configuration['constructs_preceded_by_a_single_space'] as $key) {
+ if (null !== self::$tokenMapPrecededByASingleSpace[$key]) {
+ $this->fixTokenMapPrecededByASingleSpace[$key] = self::$tokenMapPrecededByASingleSpace[$key];
+ }
+ }
+
+ $this->fixTokenMapFollowedByASingleSpace = [];
+
+ foreach ($this->configuration['constructs_followed_by_a_single_space'] as $key) {
+ if (null !== self::$tokenMapFollowedByASingleSpace[$key]) {
+ $this->fixTokenMapFollowedByASingleSpace[$key] = self::$tokenMapFollowedByASingleSpace[$key];
+ }
+ }
+
+ if (isset($this->fixTokenMapFollowedByASingleSpace['public'])) {
+ $this->fixTokenMapFollowedByASingleSpace['constructor_public'] = CT::T_CONSTRUCTOR_PROPERTY_PROMOTION_PUBLIC;
+ }
+
+ if (isset($this->fixTokenMapFollowedByASingleSpace['protected'])) {
+ $this->fixTokenMapFollowedByASingleSpace['constructor_protected'] = CT::T_CONSTRUCTOR_PROPERTY_PROMOTION_PROTECTED;
+ }
+
+ if (isset($this->fixTokenMapFollowedByASingleSpace['private'])) {
+ $this->fixTokenMapFollowedByASingleSpace['constructor_private'] = CT::T_CONSTRUCTOR_PROPERTY_PROMOTION_PRIVATE;
+ }
+ }
+
protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
{
$tokenKindsContainASingleSpace = array_values($this->fixTokenMapContainASingleSpace);
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ListNotation/ListSyntaxFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ListNotation/ListSyntaxFixer.php
index 3bc18cea..3f550e6b 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ListNotation/ListSyntaxFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ListNotation/ListSyntaxFixer.php
@@ -17,6 +17,7 @@ namespace PhpCsFixer\Fixer\ListNotation;
use PhpCsFixer\AbstractFixer;
use PhpCsFixer\ConfigurationException\InvalidFixerConfigurationException;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
@@ -27,25 +28,26 @@ use PhpCsFixer\Tokenizer\CT;
use PhpCsFixer\Tokenizer\Token;
use PhpCsFixer\Tokenizer\Tokens;
+/**
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * syntax?: 'long'|'short'
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * syntax: 'long'|'short'
+ * }
+ */
final class ListSyntaxFixer extends AbstractFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
/**
* @var null|int
*/
private $candidateTokenKind;
- /**
- * @param array{syntax: 'long'|'short'} $configuration
- *
- * @throws InvalidFixerConfigurationException
- */
- public function configure(array $configuration): void
- {
- parent::configure($configuration);
-
- $this->candidateTokenKind = 'long' === $this->configuration['syntax'] ? CT::T_DESTRUCTURING_SQUARE_BRACE_OPEN : T_LIST;
- }
-
public function getDefinition(): FixerDefinitionInterface
{
return new FixerDefinition(
@@ -77,6 +79,14 @@ final class ListSyntaxFixer extends AbstractFixer implements ConfigurableFixerIn
return $tokens->isTokenKindFound($this->candidateTokenKind);
}
+ /**
+ * @throws InvalidFixerConfigurationException
+ */
+ protected function configurePostNormalisation(): void
+ {
+ $this->candidateTokenKind = 'long' === $this->configuration['syntax'] ? CT::T_DESTRUCTURING_SQUARE_BRACE_OPEN : T_LIST;
+ }
+
protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
{
for ($index = $tokens->count() - 1; 0 <= $index; --$index) {
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/NamespaceNotation/BlankLinesBeforeNamespaceFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/NamespaceNotation/BlankLinesBeforeNamespaceFixer.php
index 4d2a78e7..2a3a9456 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/NamespaceNotation/BlankLinesBeforeNamespaceFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/NamespaceNotation/BlankLinesBeforeNamespaceFixer.php
@@ -17,6 +17,7 @@ namespace PhpCsFixer\Fixer\NamespaceNotation;
use PhpCsFixer\AbstractFixer;
use PhpCsFixer\ConfigurationException\InvalidFixerConfigurationException;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
@@ -31,9 +32,23 @@ use Symfony\Component\OptionsResolver\Options;
/**
* @author Graham Campbell
* @author Greg Korba
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * max_line_breaks?: int,
+ * min_line_breaks?: int
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * max_line_breaks: int,
+ * min_line_breaks: int
+ * }
*/
final class BlankLinesBeforeNamespaceFixer extends AbstractFixer implements WhitespacesAwareFixerInterface, ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
public function getDefinition(): FixerDefinitionInterface
{
return new FixerDefinition(
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/BinaryOperatorSpacesFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/BinaryOperatorSpacesFixer.php
index 3e7f59b8..b1b178b6 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/BinaryOperatorSpacesFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/BinaryOperatorSpacesFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\Operator;
use PhpCsFixer\AbstractFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
@@ -32,9 +33,23 @@ use Symfony\Component\OptionsResolver\Exception\InvalidOptionsException;
/**
* @author Dariusz Rumiński
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * default?: 'align'|'align_by_scope'|'align_single_space'|'align_single_space_by_scope'|'align_single_space_minimal'|'align_single_space_minimal_by_scope'|'at_least_single_space'|'no_space'|'single_space'|null,
+ * operators?: array
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * default: 'align'|'align_by_scope'|'align_single_space'|'align_single_space_by_scope'|'align_single_space_minimal'|'align_single_space_minimal_by_scope'|'at_least_single_space'|'no_space'|'single_space'|null,
+ * operators: array
+ * }
*/
final class BinaryOperatorSpacesFixer extends AbstractFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
/**
* @internal
*/
@@ -177,13 +192,6 @@ final class BinaryOperatorSpacesFixer extends AbstractFixer implements Configura
*/
private array $operators = [];
- public function configure(array $configuration): void
- {
- parent::configure($configuration);
-
- $this->operators = $this->resolveOperatorsFromConfig();
- }
-
public function getDefinition(): FixerDefinitionInterface
{
return new FixerDefinition(
@@ -320,6 +328,11 @@ $array = [
return true;
}
+ protected function configurePostNormalisation(): void
+ {
+ $this->operators = $this->resolveOperatorsFromConfig();
+ }
+
protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
{
$this->tokensAnalyzer = new TokensAnalyzer($tokens);
@@ -358,7 +371,7 @@ $array = [
->setAllowedValues(self::$allowedValues)
->getOption(),
(new FixerOptionBuilder('operators', 'Dictionary of `binary operator` => `fix strategy` values that differ from the default strategy. Supported are: '.Utils::naturalLanguageJoinWithBackticks(self::SUPPORTED_OPERATORS).'.'))
- ->setAllowedTypes(['array'])
+ ->setAllowedTypes(['array'])
->setAllowedValues([static function (array $option): bool {
foreach ($option as $operator => $value) {
if (!\in_array($operator, self::SUPPORTED_OPERATORS, true)) {
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/ConcatSpaceFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/ConcatSpaceFixer.php
index c499e628..ae89a8f4 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/ConcatSpaceFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/ConcatSpaceFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\Operator;
use PhpCsFixer\AbstractFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
@@ -27,9 +28,21 @@ use PhpCsFixer\Tokenizer\Tokens;
/**
* @author Dariusz Rumiński
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * spacing?: 'none'|'one'
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * spacing: 'none'|'one'
+ * }
*/
final class ConcatSpaceFixer extends AbstractFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
public function getDefinition(): FixerDefinitionInterface
{
return new FixerDefinition(
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/IncrementStyleFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/IncrementStyleFixer.php
index 4d2d9b8a..bc5de5bd 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/IncrementStyleFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/IncrementStyleFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\Operator;
use PhpCsFixer\Fixer\AbstractIncrementOperatorFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
@@ -29,9 +30,21 @@ use PhpCsFixer\Tokenizer\TokensAnalyzer;
/**
* @author Gregor Harlan
* @author Kuba Werłos
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * style?: 'post'|'pre'
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * style: 'post'|'pre'
+ * }
*/
final class IncrementStyleFixer extends AbstractIncrementOperatorFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
/**
* @internal
*/
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/NewWithBracesFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/NewWithBracesFixer.php
index 1fad4c76..865f6897 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/NewWithBracesFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/NewWithBracesFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\Operator;
use PhpCsFixer\AbstractProxyFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\Fixer\DeprecatedFixerInterface;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
use PhpCsFixer\FixerDefinition\FixerDefinition;
@@ -25,9 +26,23 @@ use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
* @author Dariusz Rumiński
*
* @deprecated
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * anonymous_class?: bool,
+ * named_class?: bool
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * anonymous_class: bool,
+ * named_class: bool
+ * }
*/
final class NewWithBracesFixer extends AbstractProxyFixer implements ConfigurableFixerInterface, DeprecatedFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
private NewWithParenthesesFixer $newWithParenthesesFixer;
public function __construct()
@@ -59,13 +74,6 @@ final class NewWithBracesFixer extends AbstractProxyFixer implements Configurabl
return $this->newWithParenthesesFixer->getPriority();
}
- public function configure(array $configuration): void
- {
- $this->newWithParenthesesFixer->configure($configuration);
-
- parent::configure($configuration);
- }
-
public function getSuccessorsNames(): array
{
return [
@@ -73,6 +81,14 @@ final class NewWithBracesFixer extends AbstractProxyFixer implements Configurabl
];
}
+ /**
+ * @param _AutogeneratedInputConfiguration $configuration
+ */
+ protected function configurePreNormalisation(array $configuration): void
+ {
+ $this->newWithParenthesesFixer->configure($configuration);
+ }
+
protected function createProxyFixers(): array
{
return [
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/NewWithParenthesesFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/NewWithParenthesesFixer.php
index 81f95ece..e1621fc8 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/NewWithParenthesesFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/NewWithParenthesesFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\Operator;
use PhpCsFixer\AbstractFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
@@ -28,9 +29,23 @@ use PhpCsFixer\Tokenizer\Tokens;
/**
* @author Dariusz Rumiński
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * anonymous_class?: bool,
+ * named_class?: bool
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * anonymous_class: bool,
+ * named_class: bool
+ * }
*/
final class NewWithParenthesesFixer extends AbstractFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
public function getDefinition(): FixerDefinitionInterface
{
return new FixerDefinition(
@@ -64,6 +79,21 @@ final class NewWithParenthesesFixer extends AbstractFixer implements Configurabl
return $tokens->isTokenKindFound(T_NEW);
}
+ /** @protected */
+ public function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('named_class', 'Whether named classes should be followed by parentheses.'))
+ ->setAllowedTypes(['bool'])
+ ->setDefault(true)
+ ->getOption(),
+ (new FixerOptionBuilder('anonymous_class', 'Whether anonymous classes should be followed by parentheses.'))
+ ->setAllowedTypes(['bool'])
+ ->setDefault(true)
+ ->getOption(),
+ ]);
+ }
+
protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
{
static $nextTokenKinds = null;
@@ -155,20 +185,6 @@ final class NewWithParenthesesFixer extends AbstractFixer implements Configurabl
}
}
- protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
- {
- return new FixerConfigurationResolver([
- (new FixerOptionBuilder('named_class', 'Whether named classes should be followed by parentheses.'))
- ->setAllowedTypes(['bool'])
- ->setDefault(true)
- ->getOption(),
- (new FixerOptionBuilder('anonymous_class', 'Whether anonymous classes should be followed by parentheses.'))
- ->setAllowedTypes(['bool'])
- ->setDefault(true)
- ->getOption(),
- ]);
- }
-
private function ensureParenthesesAt(Tokens $tokens, int $index): void
{
$token = $tokens[$index];
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/NoUselessConcatOperatorFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/NoUselessConcatOperatorFixer.php
index 79c35e7c..a2cdd158 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/NoUselessConcatOperatorFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/NoUselessConcatOperatorFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\Operator;
use PhpCsFixer\AbstractFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
@@ -32,9 +33,21 @@ use PhpCsFixer\Tokenizer\Tokens;
* end: int,
* type: self::STR_*,
* }
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * juggle_simple_strings?: bool
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * juggle_simple_strings: bool
+ * }
*/
final class NoUselessConcatOperatorFixer extends AbstractFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
private const STR_DOUBLE_QUOTE = 0;
private const STR_DOUBLE_QUOTE_VAR = 1;
private const STR_SINGLE_QUOTE = 2;
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/OperatorLinebreakFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/OperatorLinebreakFixer.php
index a73a28c4..fdec2fb1 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/OperatorLinebreakFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/OperatorLinebreakFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\Operator;
use PhpCsFixer\AbstractFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
@@ -32,9 +33,23 @@ use PhpCsFixer\Tokenizer\Tokens;
/**
* @author Kuba Werłos
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * only_booleans?: bool,
+ * position?: 'beginning'|'end'
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * only_booleans: bool,
+ * position: 'beginning'|'end'
+ * }
*/
final class OperatorLinebreakFixer extends AbstractFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
private const BOOLEAN_OPERATORS = [[T_BOOLEAN_AND], [T_BOOLEAN_OR], [T_LOGICAL_AND], [T_LOGICAL_OR], [T_LOGICAL_XOR]];
private string $position = 'beginning';
@@ -68,10 +83,13 @@ function foo() {
);
}
- public function configure(array $configuration): void
+ public function isCandidate(Tokens $tokens): bool
{
- parent::configure($configuration);
+ return true;
+ }
+ protected function configurePostNormalisation(): void
+ {
$this->position = $this->configuration['position'];
$this->operators = self::BOOLEAN_OPERATORS;
@@ -80,11 +98,6 @@ function foo() {
}
}
- public function isCandidate(Tokens $tokens): bool
- {
- return true;
- }
-
protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
{
return new FixerConfigurationResolver([
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/UnaryOperatorSpacesFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/UnaryOperatorSpacesFixer.php
index 873e9326..42b977fe 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/UnaryOperatorSpacesFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/UnaryOperatorSpacesFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\Operator;
use PhpCsFixer\AbstractFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
@@ -28,9 +29,21 @@ use PhpCsFixer\Tokenizer\TokensAnalyzer;
/**
* @author Gregor Harlan
* @author Dariusz Rumiński
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * only_dec_inc?: bool
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * only_dec_inc: bool
+ * }
*/
final class UnaryOperatorSpacesFixer extends AbstractFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
public function getDefinition(): FixerDefinitionInterface
{
return new FixerDefinition(
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpTag/EchoTagSyntaxFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpTag/EchoTagSyntaxFixer.php
index 7c61daad..2953c35d 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpTag/EchoTagSyntaxFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpTag/EchoTagSyntaxFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\PhpTag;
use PhpCsFixer\AbstractFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
@@ -27,9 +28,25 @@ use PhpCsFixer\Tokenizer\Tokens;
/**
* @author Michele Locati
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * format?: 'long'|'short',
+ * long_function?: 'echo'|'print',
+ * shorten_simple_statements_only?: bool
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * format: 'long'|'short',
+ * long_function: 'echo'|'print',
+ * shorten_simple_statements_only: bool
+ * }
*/
final class EchoTagSyntaxFixer extends AbstractFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
/** @internal */
public const OPTION_FORMAT = 'format';
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitConstructFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitConstructFixer.php
index 47211482..c0b6efae 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitConstructFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitConstructFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\PhpUnit;
use PhpCsFixer\Fixer\AbstractPhpUnitFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\AllowedValueSubset;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
@@ -29,9 +30,21 @@ use PhpCsFixer\Tokenizer\Tokens;
/**
* @author Dariusz Rumiński
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * assertions?: list<'assertEquals'|'assertNotEquals'|'assertNotSame'|'assertSame'>
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * assertions: list<'assertEquals'|'assertNotEquals'|'assertNotSame'|'assertSame'>
+ * }
*/
final class PhpUnitConstructFixer extends AbstractPhpUnitFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
public function isRisky(): bool
{
return true;
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitDataProviderNameFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitDataProviderNameFixer.php
index ae69b579..c96efca8 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitDataProviderNameFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitDataProviderNameFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\PhpUnit;
use PhpCsFixer\Fixer\AbstractPhpUnitFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
@@ -29,9 +30,23 @@ use PhpCsFixer\Tokenizer\Tokens;
/**
* @author Kuba Werłos
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * prefix?: string,
+ * suffix?: string
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * prefix: string,
+ * suffix: string
+ * }
*/
final class PhpUnitDataProviderNameFixer extends AbstractPhpUnitFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
public function getDefinition(): FixerDefinitionInterface
{
return new FixerDefinition(
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitDataProviderStaticFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitDataProviderStaticFixer.php
index 70fb1d5f..d9ba966e 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitDataProviderStaticFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitDataProviderStaticFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\PhpUnit;
use PhpCsFixer\Fixer\AbstractPhpUnitFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
@@ -29,9 +30,21 @@ use PhpCsFixer\Tokenizer\TokensAnalyzer;
/**
* @author Kuba Werłos
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * force?: bool
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * force: bool
+ * }
*/
final class PhpUnitDataProviderStaticFixer extends AbstractPhpUnitFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
public function getDefinition(): FixerDefinitionInterface
{
return new FixerDefinition(
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitDedicateAssertFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitDedicateAssertFixer.php
index c65dd239..6f443725 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitDedicateAssertFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitDedicateAssertFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\PhpUnit;
use PhpCsFixer\Fixer\AbstractPhpUnitFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
@@ -30,9 +31,21 @@ use PhpCsFixer\Tokenizer\Tokens;
/**
* @author Dariusz Rumiński
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * target?: '3.0'|'3.5'|'5.0'|'5.6'|'newest'
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * target: '3.0'|'3.5'|'5.0'|'5.6'|'newest'
+ * }
*/
final class PhpUnitDedicateAssertFixer extends AbstractPhpUnitFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
/**
* @var array
*/
@@ -113,10 +126,61 @@ final class PhpUnitDedicateAssertFixer extends AbstractPhpUnitFixer implements C
*/
private array $functions = [];
- public function configure(array $configuration): void
+ public function isRisky(): bool
{
- parent::configure($configuration);
+ return true;
+ }
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'PHPUnit assertions like `assertInternalType`, `assertFileExists`, should be used over `assertTrue`.',
+ [
+ new CodeSample(
+ 'assertTrue(is_float( $a), "my message");
+ $this->assertTrue(is_nan($a));
+ }
+}
+'
+ ),
+ new CodeSample(
+ 'assertTrue(is_dir($a));
+ $this->assertTrue(is_writable($a));
+ $this->assertTrue(is_readable($a));
+ }
+}
+',
+ ['target' => PhpUnitTargetVersion::VERSION_5_6]
+ ),
+ ],
+ null,
+ 'Fixer could be risky if one is overriding PHPUnit\'s native methods.'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before NoUnusedImportsFixer, PhpUnitDedicateAssertInternalTypeFixer.
+ * Must run after ModernizeStrposFixer, NoAliasFunctionsFixer, PhpUnitConstructFixer.
+ */
+ public function getPriority(): int
+ {
+ return -9;
+ }
+
+ protected function configurePostNormalisation(): void
+ {
// assertions added in 3.0: assertArrayNotHasKey assertArrayHasKey assertFileNotExists assertFileExists assertNotNull, assertNull
$this->functions = [
'array_key_exists',
@@ -171,59 +235,6 @@ final class PhpUnitDedicateAssertFixer extends AbstractPhpUnitFixer implements C
}
}
- public function isRisky(): bool
- {
- return true;
- }
-
- public function getDefinition(): FixerDefinitionInterface
- {
- return new FixerDefinition(
- 'PHPUnit assertions like `assertInternalType`, `assertFileExists`, should be used over `assertTrue`.',
- [
- new CodeSample(
- 'assertTrue(is_float( $a), "my message");
- $this->assertTrue(is_nan($a));
- }
-}
-'
- ),
- new CodeSample(
- 'assertTrue(is_dir($a));
- $this->assertTrue(is_writable($a));
- $this->assertTrue(is_readable($a));
- }
-}
-',
- ['target' => PhpUnitTargetVersion::VERSION_5_6]
- ),
- ],
- null,
- 'Fixer could be risky if one is overriding PHPUnit\'s native methods.'
- );
- }
-
- /**
- * {@inheritdoc}
- *
- * Must run before NoUnusedImportsFixer, PhpUnitDedicateAssertInternalTypeFixer.
- * Must run after ModernizeStrposFixer, NoAliasFunctionsFixer, PhpUnitConstructFixer.
- */
- public function getPriority(): int
- {
- return -9;
- }
-
protected function applyPhpUnitClassFix(Tokens $tokens, int $startIndex, int $endIndex): void
{
$argumentsAnalyzer = new ArgumentsAnalyzer();
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitDedicateAssertInternalTypeFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitDedicateAssertInternalTypeFixer.php
index b6e955ea..ece43be2 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitDedicateAssertInternalTypeFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitDedicateAssertInternalTypeFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\PhpUnit;
use PhpCsFixer\Fixer\AbstractPhpUnitFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
@@ -28,9 +29,21 @@ use PhpCsFixer\Tokenizer\TokensAnalyzer;
/**
* @author Filippo Tessarotto
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * target?: '7.5'|'newest'
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * target: '7.5'|'newest'
+ * }
*/
final class PhpUnitDedicateAssertInternalTypeFixer extends AbstractPhpUnitFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
/**
* @var array
*/
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitExpectationFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitExpectationFixer.php
index ca8464d2..2429288a 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitExpectationFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitExpectationFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\PhpUnit;
use PhpCsFixer\Fixer\AbstractPhpUnitFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
@@ -30,32 +31,26 @@ use PhpCsFixer\Tokenizer\Tokens;
/**
* @author Dariusz Rumiński
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * target?: '5.2'|'5.6'|'8.4'|'newest'
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * target: '5.2'|'5.6'|'8.4'|'newest'
+ * }
*/
final class PhpUnitExpectationFixer extends AbstractPhpUnitFixer implements ConfigurableFixerInterface, WhitespacesAwareFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
/**
* @var array
*/
private array $methodMap = [];
- public function configure(array $configuration): void
- {
- parent::configure($configuration);
-
- $this->methodMap = [
- 'setExpectedException' => 'expectExceptionMessage',
- ];
-
- if (PhpUnitTargetVersion::fulfills($this->configuration['target'], PhpUnitTargetVersion::VERSION_5_6)) {
- $this->methodMap['setExpectedExceptionRegExp'] = 'expectExceptionMessageRegExp';
- }
-
- if (PhpUnitTargetVersion::fulfills($this->configuration['target'], PhpUnitTargetVersion::VERSION_8_4)) {
- $this->methodMap['setExpectedExceptionRegExp'] = 'expectExceptionMessageMatches';
- $this->methodMap['expectExceptionMessageRegExp'] = 'expectExceptionMessageMatches';
- }
- }
-
public function getDefinition(): FixerDefinitionInterface
{
return new FixerDefinition(
@@ -157,6 +152,22 @@ final class MyTest extends \PHPUnit_Framework_TestCase
return true;
}
+ protected function configurePostNormalisation(): void
+ {
+ $this->methodMap = [
+ 'setExpectedException' => 'expectExceptionMessage',
+ ];
+
+ if (PhpUnitTargetVersion::fulfills($this->configuration['target'], PhpUnitTargetVersion::VERSION_5_6)) {
+ $this->methodMap['setExpectedExceptionRegExp'] = 'expectExceptionMessageRegExp';
+ }
+
+ if (PhpUnitTargetVersion::fulfills($this->configuration['target'], PhpUnitTargetVersion::VERSION_8_4)) {
+ $this->methodMap['setExpectedExceptionRegExp'] = 'expectExceptionMessageMatches';
+ $this->methodMap['expectExceptionMessageRegExp'] = 'expectExceptionMessageMatches';
+ }
+ }
+
protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
{
return new FixerConfigurationResolver([
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitInternalClassFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitInternalClassFixer.php
index 40f34838..1a50197f 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitInternalClassFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitInternalClassFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\PhpUnit;
use PhpCsFixer\Fixer\AbstractPhpUnitFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
use PhpCsFixer\FixerConfiguration\AllowedValueSubset;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
@@ -29,9 +30,21 @@ use PhpCsFixer\Tokenizer\TokensAnalyzer;
/**
* @author Gert de Pagter
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * types?: list<'abstract'|'final'|'normal'>
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * types: list<'abstract'|'final'|'normal'>
+ * }
*/
final class PhpUnitInternalClassFixer extends AbstractPhpUnitFixer implements WhitespacesAwareFixerInterface, ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
public function getDefinition(): FixerDefinitionInterface
{
return new FixerDefinition(
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitMethodCasingFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitMethodCasingFixer.php
index c742c2d1..23868a4a 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitMethodCasingFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitMethodCasingFixer.php
@@ -18,6 +18,7 @@ use PhpCsFixer\DocBlock\DocBlock;
use PhpCsFixer\DocBlock\Line;
use PhpCsFixer\Fixer\AbstractPhpUnitFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
@@ -32,9 +33,21 @@ use PhpCsFixer\Utils;
/**
* @author Filippo Tessarotto
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * case?: 'camel_case'|'snake_case'
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * case: 'camel_case'|'snake_case'
+ * }
*/
final class PhpUnitMethodCasingFixer extends AbstractPhpUnitFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
/**
* @internal
*/
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitMockFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitMockFixer.php
index a3d3484c..5e541926 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitMockFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitMockFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\PhpUnit;
use PhpCsFixer\Fixer\AbstractPhpUnitFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
@@ -28,9 +29,21 @@ use PhpCsFixer\Tokenizer\Tokens;
/**
* @author Dariusz Rumiński
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * target?: '5.4'|'5.5'|'newest'
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * target: '5.4'|'5.5'|'newest'
+ * }
*/
final class PhpUnitMockFixer extends AbstractPhpUnitFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
/**
* @var bool
*/
@@ -79,10 +92,8 @@ final class MyTest extends \PHPUnit_Framework_TestCase
return true;
}
- public function configure(array $configuration): void
+ protected function configurePostNormalisation(): void
{
- parent::configure($configuration);
-
$this->fixCreatePartialMock = PhpUnitTargetVersion::fulfills($this->configuration['target'], PhpUnitTargetVersion::VERSION_5_5);
}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitNamespacedFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitNamespacedFixer.php
index d521007d..0a582b09 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitNamespacedFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitNamespacedFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\PhpUnit;
use PhpCsFixer\AbstractFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
@@ -29,9 +30,21 @@ use PhpCsFixer\Tokenizer\Tokens;
/**
* @author Dariusz Rumiński
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * target?: '4.8'|'5.7'|'6.0'|'newest'
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * target: '4.8'|'5.7'|'6.0'|'newest'
+ * }
*/
final class PhpUnitNamespacedFixer extends AbstractFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
/**
* @var string
*/
@@ -85,10 +98,8 @@ final class MyTest extends \PHPUnit_Framework_TestCase
return true;
}
- public function configure(array $configuration): void
+ protected function configurePostNormalisation(): void
{
- parent::configure($configuration);
-
if (PhpUnitTargetVersion::fulfills($this->configuration['target'], PhpUnitTargetVersion::VERSION_6_0)) {
$this->originalClassRegEx = '/^PHPUnit_\w+$/i';
// @noinspection ClassConstantCanBeUsedInspection
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitNoExpectationAnnotationFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitNoExpectationAnnotationFixer.php
index f6fa1f0f..f50a7c5e 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitNoExpectationAnnotationFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitNoExpectationAnnotationFixer.php
@@ -18,6 +18,7 @@ use PhpCsFixer\DocBlock\Annotation;
use PhpCsFixer\DocBlock\DocBlock;
use PhpCsFixer\Fixer\AbstractPhpUnitFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
@@ -33,21 +34,28 @@ use PhpCsFixer\Tokenizer\TokensAnalyzer;
/**
* @author Dariusz Rumiński
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * target?: '3.2'|'4.3'|'newest',
+ * use_class_const?: bool
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * target: '3.2'|'4.3'|'newest',
+ * use_class_const: bool
+ * }
*/
final class PhpUnitNoExpectationAnnotationFixer extends AbstractPhpUnitFixer implements ConfigurableFixerInterface, WhitespacesAwareFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
/**
* @var bool
*/
private $fixMessageRegExp;
- public function configure(array $configuration): void
- {
- parent::configure($configuration);
-
- $this->fixMessageRegExp = PhpUnitTargetVersion::fulfills($this->configuration['target'], PhpUnitTargetVersion::VERSION_4_3);
- }
-
public function getDefinition(): FixerDefinitionInterface
{
return new FixerDefinition(
@@ -115,6 +123,11 @@ final class MyTest extends \PHPUnit_Framework_TestCase
return true;
}
+ protected function configurePostNormalisation(): void
+ {
+ $this->fixMessageRegExp = PhpUnitTargetVersion::fulfills($this->configuration['target'], PhpUnitTargetVersion::VERSION_4_3);
+ }
+
protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
{
return new FixerConfigurationResolver([
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitSizeClassFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitSizeClassFixer.php
index 4023493d..669bb78a 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitSizeClassFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitSizeClassFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\PhpUnit;
use PhpCsFixer\Fixer\AbstractPhpUnitFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
@@ -27,9 +28,21 @@ use PhpCsFixer\Tokenizer\Tokens;
/**
* @author Jefersson Nathan
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * group?: 'large'|'medium'|'small'
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * group: 'large'|'medium'|'small'
+ * }
*/
final class PhpUnitSizeClassFixer extends AbstractPhpUnitFixer implements WhitespacesAwareFixerInterface, ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
private const SIZES = ['small', 'medium', 'large'];
public function getDefinition(): FixerDefinitionInterface
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitStrictFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitStrictFixer.php
index 75efba02..c9f9552d 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitStrictFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitStrictFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\PhpUnit;
use PhpCsFixer\Fixer\AbstractPhpUnitFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\AllowedValueSubset;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
@@ -30,9 +31,21 @@ use PhpCsFixer\Tokenizer\Tokens;
/**
* @author Dariusz Rumiński
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * assertions?: list<'assertAttributeEquals'|'assertAttributeNotEquals'|'assertEquals'|'assertNotEquals'>
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * assertions: list<'assertAttributeEquals'|'assertAttributeNotEquals'|'assertEquals'|'assertNotEquals'>
+ * }
*/
final class PhpUnitStrictFixer extends AbstractPhpUnitFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
/**
* @var array
*/
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitTestAnnotationFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitTestAnnotationFixer.php
index 455d512b..8b524346 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitTestAnnotationFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitTestAnnotationFixer.php
@@ -18,6 +18,7 @@ use PhpCsFixer\DocBlock\DocBlock;
use PhpCsFixer\DocBlock\Line;
use PhpCsFixer\Fixer\AbstractPhpUnitFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
@@ -33,9 +34,21 @@ use PhpCsFixer\Tokenizer\TokensAnalyzer;
/**
* @author Gert de Pagter
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * style?: 'annotation'|'prefix'
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * style: 'annotation'|'prefix'
+ * }
*/
final class PhpUnitTestAnnotationFixer extends AbstractPhpUnitFixer implements ConfigurableFixerInterface, WhitespacesAwareFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
public function isRisky(): bool
{
return true;
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitTestCaseStaticMethodCallsFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitTestCaseStaticMethodCallsFixer.php
index 534cfc65..e6d34bc0 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitTestCaseStaticMethodCallsFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitTestCaseStaticMethodCallsFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\PhpUnit;
use PhpCsFixer\Fixer\AbstractPhpUnitFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
@@ -32,9 +33,23 @@ use Symfony\Component\OptionsResolver\Exception\InvalidOptionsException;
/**
* @author Filippo Tessarotto
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * call_type?: 'self'|'static'|'this',
+ * methods?: list
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * call_type: 'self'|'static'|'this',
+ * methods: list
+ * }
*/
final class PhpUnitTestCaseStaticMethodCallsFixer extends AbstractPhpUnitFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
/**
* @internal
*/
@@ -196,6 +211,7 @@ final class PhpUnitTestCaseStaticMethodCallsFixer extends AbstractPhpUnitFixer i
'assertObjectEquals' => true,
'assertObjectHasAttribute' => true,
'assertObjectHasProperty' => true,
+ 'assertObjectNotEquals' => true,
'assertObjectNotHasAttribute' => true,
'assertObjectNotHasProperty' => true,
'assertRegExp' => true,
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/AlignMultilineCommentFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/AlignMultilineCommentFixer.php
index eb6b3158..ff32cd2f 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/AlignMultilineCommentFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/AlignMultilineCommentFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\Phpdoc;
use PhpCsFixer\AbstractFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
@@ -30,24 +31,26 @@ use PhpCsFixer\Tokenizer\Tokens;
/**
* @author Filippo Tessarotto
* @author Julien Falque
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * comment_type?: 'all_multiline'|'phpdocs_like'|'phpdocs_only'
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * comment_type: 'all_multiline'|'phpdocs_like'|'phpdocs_only'
+ * }
*/
final class AlignMultilineCommentFixer extends AbstractFixer implements ConfigurableFixerInterface, WhitespacesAwareFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
/**
* @var null|list
*/
private $tokenKinds;
- public function configure(array $configuration): void
- {
- parent::configure($configuration);
-
- $this->tokenKinds = [T_DOC_COMMENT];
- if ('phpdocs_only' !== $this->configuration['comment_type']) {
- $this->tokenKinds[] = T_COMMENT;
- }
- }
-
public function getDefinition(): FixerDefinitionInterface
{
return new FixerDefinition(
@@ -100,6 +103,14 @@ with a line not prefixed with asterisk
return $tokens->isAnyTokenKindsFound($this->tokenKinds);
}
+ protected function configurePostNormalisation(): void
+ {
+ $this->tokenKinds = [T_DOC_COMMENT];
+ if ('phpdocs_only' !== $this->configuration['comment_type']) {
+ $this->tokenKinds[] = T_COMMENT;
+ }
+ }
+
protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
{
$lineEnding = $this->whitespacesConfig->getLineEnding();
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/GeneralPhpdocAnnotationRemoveFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/GeneralPhpdocAnnotationRemoveFixer.php
index 03245f22..18b66a35 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/GeneralPhpdocAnnotationRemoveFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/GeneralPhpdocAnnotationRemoveFixer.php
@@ -18,6 +18,7 @@ use PhpCsFixer\AbstractFixer;
use PhpCsFixer\DocBlock\Annotation;
use PhpCsFixer\DocBlock\DocBlock;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
@@ -30,9 +31,23 @@ use PhpCsFixer\Tokenizer\Tokens;
/**
* @author Graham Campbell
* @author Dariusz Rumiński
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * annotations?: list,
+ * case_sensitive?: bool
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * annotations: list,
+ * case_sensitive: bool
+ * }
*/
final class GeneralPhpdocAnnotationRemoveFixer extends AbstractFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
public function getDefinition(): FixerDefinitionInterface
{
return new FixerDefinition(
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/GeneralPhpdocTagRenameFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/GeneralPhpdocTagRenameFixer.php
index efe9da1c..554b716e 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/GeneralPhpdocTagRenameFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/GeneralPhpdocTagRenameFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\Phpdoc;
use PhpCsFixer\AbstractFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
@@ -28,8 +29,27 @@ use PhpCsFixer\Tokenizer\Tokens;
use Symfony\Component\OptionsResolver\Exception\InvalidOptionsException;
use Symfony\Component\OptionsResolver\Options;
+/**
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * case_sensitive?: bool,
+ * fix_annotation?: bool,
+ * fix_inline?: bool,
+ * replacements?: array
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * case_sensitive: bool,
+ * fix_annotation: bool,
+ * fix_inline: bool,
+ * replacements: array
+ * }
+ */
final class GeneralPhpdocTagRenameFixer extends AbstractFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
public function getDefinition(): FixerDefinitionInterface
{
return new FixerDefinition(
@@ -91,7 +111,7 @@ final class GeneralPhpdocTagRenameFixer extends AbstractFixer implements Configu
->setDefault(true)
->getOption(),
(new FixerOptionBuilder('replacements', 'A map of tags to replace.'))
- ->setAllowedTypes(['string[]'])
+ ->setAllowedTypes(['array'])
->setNormalizer(static function (Options $options, array $value): array {
$normalizedValue = [];
@@ -100,13 +120,6 @@ final class GeneralPhpdocTagRenameFixer extends AbstractFixer implements Configu
throw new InvalidOptionsException('Tag to replace must be a string.');
}
- if (!\is_string($to)) {
- throw new InvalidOptionsException(sprintf(
- 'Tag to replace to from "%s" must be a string.',
- $from
- ));
- }
-
if (!Preg::match('#^\S+$#', $to) || str_contains($to, '*/')) {
throw new InvalidOptionsException(sprintf(
'Tag "%s" cannot be replaced by invalid tag "%s".',
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/NoSuperfluousPhpdocTagsFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/NoSuperfluousPhpdocTagsFixer.php
index e98ffe61..a6c16b6b 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/NoSuperfluousPhpdocTagsFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/NoSuperfluousPhpdocTagsFixer.php
@@ -19,6 +19,7 @@ use PhpCsFixer\DocBlock\Annotation;
use PhpCsFixer\DocBlock\DocBlock;
use PhpCsFixer\DocBlock\TypeExpression;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
@@ -45,9 +46,27 @@ use PhpCsFixer\Tokenizer\TokensAnalyzer;
* modifiers: array,
* types: array,
* }
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * allow_hidden_params?: bool,
+ * allow_mixed?: bool,
+ * allow_unused_params?: bool,
+ * remove_inheritdoc?: bool
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * allow_hidden_params: bool,
+ * allow_mixed: bool,
+ * allow_unused_params: bool,
+ * remove_inheritdoc: bool
+ * }
*/
final class NoSuperfluousPhpdocTagsFixer extends AbstractFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
/** @var _TypeInfo */
private const NO_TYPE_INFO = [
'types' => [],
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocAddMissingParamAnnotationFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocAddMissingParamAnnotationFixer.php
index 0739be25..62742d1e 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocAddMissingParamAnnotationFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocAddMissingParamAnnotationFixer.php
@@ -18,6 +18,7 @@ use PhpCsFixer\AbstractFixer;
use PhpCsFixer\DocBlock\DocBlock;
use PhpCsFixer\DocBlock\Line;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
@@ -33,9 +34,21 @@ use PhpCsFixer\Tokenizer\Tokens;
/**
* @author Dariusz Rumiński
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * only_untyped?: bool
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * only_untyped: bool
+ * }
*/
final class PhpdocAddMissingParamAnnotationFixer extends AbstractFixer implements ConfigurableFixerInterface, WhitespacesAwareFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
public function getDefinition(): FixerDefinitionInterface
{
return new FixerDefinition(
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocAlignFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocAlignFixer.php
index 0c30e6da..a511f8d5 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocAlignFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocAlignFixer.php
@@ -18,6 +18,7 @@ use PhpCsFixer\AbstractFixer;
use PhpCsFixer\DocBlock\DocBlock;
use PhpCsFixer\DocBlock\TypeExpression;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
@@ -37,9 +38,25 @@ use Symfony\Component\OptionsResolver\Exception\InvalidOptionsException;
* @author Graham Campbell
* @author Dariusz Rumiński
* @author Jakub Kwaśniewski
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * align?: 'left'|'vertical',
+ * spacing?: array|int,
+ * tags?: list
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * align: 'left'|'vertical',
+ * spacing: array|int,
+ * tags: list
+ * }
*/
final class PhpdocAlignFixer extends AbstractFixer implements ConfigurableFixerInterface, WhitespacesAwareFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
/**
* @internal
*/
@@ -105,42 +122,6 @@ final class PhpdocAlignFixer extends AbstractFixer implements ConfigurableFixerI
*/
private $spacing = 1;
- public function configure(array $configuration): void
- {
- parent::configure($configuration);
-
- $tagsWithNameToAlign = array_intersect($this->configuration['tags'], self::TAGS_WITH_NAME);
- $tagsWithMethodSignatureToAlign = array_intersect($this->configuration['tags'], self::TAGS_WITH_METHOD_SIGNATURE);
- $tagsWithoutNameToAlign = array_diff($this->configuration['tags'], $tagsWithNameToAlign, $tagsWithMethodSignatureToAlign);
-
- $indentRegex = '^(?P(?:\ {2}|\t)*)\ ?';
-
- $types = [];
-
- // e.g. @param <$var>
- if ([] !== $tagsWithNameToAlign) {
- $types[] = '(?P'.implode('|', $tagsWithNameToAlign).')\s+(?P(?:'.TypeExpression::REGEX_TYPES.')?)\s*(?P(?:&|\.{3})?\$\S+)';
- }
-
- // e.g. @return
- if ([] !== $tagsWithoutNameToAlign) {
- $types[] = '(?P'.implode('|', $tagsWithoutNameToAlign).')\s+(?P(?:'.TypeExpression::REGEX_TYPES.')?)';
- }
-
- // e.g. @method
- if ([] !== $tagsWithMethodSignatureToAlign) {
- $types[] = '(?P'.implode('|', $tagsWithMethodSignatureToAlign).')(\s+(?Pstatic))?(\s+(?P(?:'.TypeExpression::REGEX_TYPES.')?))\s+(?P.+\))';
- }
-
- // optional
- $desc = '(?:\s+(?P\V*))';
-
- $this->regex = '/'.$indentRegex.'\*\h*@(?J)(?:'.implode('|', $types).')'.$desc.'\h*\r?$/';
- $this->regexCommentLine = '/'.$indentRegex.'\*(?!\h?+@)(?:\s+(?P\V+))(?align = $this->configuration['align'];
- $this->spacing = $this->configuration['spacing'];
- }
-
public function getDefinition(): FixerDefinitionInterface
{
$code = <<<'EOF'
@@ -195,6 +176,40 @@ final class PhpdocAlignFixer extends AbstractFixer implements ConfigurableFixerI
return $tokens->isTokenKindFound(T_DOC_COMMENT);
}
+ protected function configurePostNormalisation(): void
+ {
+ $tagsWithNameToAlign = array_intersect($this->configuration['tags'], self::TAGS_WITH_NAME);
+ $tagsWithMethodSignatureToAlign = array_intersect($this->configuration['tags'], self::TAGS_WITH_METHOD_SIGNATURE);
+ $tagsWithoutNameToAlign = array_diff($this->configuration['tags'], $tagsWithNameToAlign, $tagsWithMethodSignatureToAlign);
+
+ $indentRegex = '^(?P(?:\ {2}|\t)*)\ ?';
+
+ $types = [];
+
+ // e.g. @param <$var>
+ if ([] !== $tagsWithNameToAlign) {
+ $types[] = '(?P'.implode('|', $tagsWithNameToAlign).')\s+(?P(?:'.TypeExpression::REGEX_TYPES.')?)\s*(?P(?:&|\.{3})?\$\S+)';
+ }
+
+ // e.g. @return
+ if ([] !== $tagsWithoutNameToAlign) {
+ $types[] = '(?P'.implode('|', $tagsWithoutNameToAlign).')\s+(?P(?:'.TypeExpression::REGEX_TYPES.')?)';
+ }
+
+ // e.g. @method
+ if ([] !== $tagsWithMethodSignatureToAlign) {
+ $types[] = '(?P'.implode('|', $tagsWithMethodSignatureToAlign).')(\s+(?Pstatic))?(\s+(?P(?:'.TypeExpression::REGEX_TYPES.')?))\s+(?P.+\))';
+ }
+
+ // optional
+ $desc = '(?:\s+(?P\V*))';
+
+ $this->regex = '/'.$indentRegex.'\*\h*@(?J)(?:'.implode('|', $types).')'.$desc.'\h*\r?$/';
+ $this->regexCommentLine = '/'.$indentRegex.'\*(?!\h?+@)(?:\s+(?P\V+))(?align = $this->configuration['align'];
+ $this->spacing = $this->configuration['spacing'];
+ }
+
protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
{
foreach ($tokens as $index => $token) {
@@ -245,7 +260,7 @@ final class PhpdocAlignFixer extends AbstractFixer implements ConfigurableFixerI
'spacing',
'Spacing between tag, hint, comment, signature, etc. You can set same spacing for all tags using a positive integer or different spacings for different tags using an associative array of positive integers `[\'tagA\' => spacingForA, \'tagB\' => spacingForB]`. If you want to define default spacing to more than 1 space use `_default` key in config array, e.g.: `[\'tagA\' => spacingForA, \'tagB\' => spacingForB, \'_default\' => spacingForAllOthers]`.'
);
- $spacing->setAllowedTypes(['int', 'int[]'])
+ $spacing->setAllowedTypes(['int', 'array'])
->setAllowedValues([$allowPositiveIntegers])
->setDefault(self::DEFAULT_SPACING)
;
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocInlineTagNormalizerFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocInlineTagNormalizerFixer.php
index a6270fde..de278009 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocInlineTagNormalizerFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocInlineTagNormalizerFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\Phpdoc;
use PhpCsFixer\AbstractFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
@@ -26,8 +27,21 @@ use PhpCsFixer\Preg;
use PhpCsFixer\Tokenizer\Token;
use PhpCsFixer\Tokenizer\Tokens;
+/**
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * tags?: list
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * tags: list
+ * }
+ */
final class PhpdocInlineTagNormalizerFixer extends AbstractFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
public function isCandidate(Tokens $tokens): bool
{
return $tokens->isTokenKindFound(T_DOC_COMMENT);
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocLineSpanFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocLineSpanFixer.php
index a667dd20..9a639ae1 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocLineSpanFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocLineSpanFixer.php
@@ -17,6 +17,7 @@ namespace PhpCsFixer\Fixer\Phpdoc;
use PhpCsFixer\AbstractFixer;
use PhpCsFixer\DocBlock\DocBlock;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
@@ -32,9 +33,25 @@ use PhpCsFixer\Tokenizer\TokensAnalyzer;
/**
* @author Gert de Pagter
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * const?: 'multi'|'single'|null,
+ * method?: 'multi'|'single'|null,
+ * property?: 'multi'|'single'|null
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * const: 'multi'|'single'|null,
+ * method: 'multi'|'single'|null,
+ * property: 'multi'|'single'|null
+ * }
*/
final class PhpdocLineSpanFixer extends AbstractFixer implements WhitespacesAwareFixerInterface, ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
public function getDefinition(): FixerDefinitionInterface
{
return new FixerDefinition(
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocNoAccessFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocNoAccessFixer.php
index 12300026..e5f899ff 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocNoAccessFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocNoAccessFixer.php
@@ -60,7 +60,11 @@ class Foo
protected function createProxyFixers(): array
{
$fixer = new GeneralPhpdocAnnotationRemoveFixer();
- $fixer->configure(['annotations' => ['access']]);
+ $fixer->configure(
+ ['annotations' => ['access'],
+ 'case_sensitive' => true,
+ ]
+ );
return [$fixer];
}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocNoAliasTagFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocNoAliasTagFixer.php
index 48699f55..d50e42d1 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocNoAliasTagFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocNoAliasTagFixer.php
@@ -18,6 +18,7 @@ use PhpCsFixer\AbstractProxyFixer;
use PhpCsFixer\ConfigurationException\InvalidConfigurationException;
use PhpCsFixer\ConfigurationException\InvalidFixerConfigurationException;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
@@ -31,9 +32,21 @@ use PhpCsFixer\Preg;
*
* @author Graham Campbell
* @author Dariusz Rumiński
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * replacements?: array
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * replacements: array
+ * }
*/
final class PhpdocNoAliasTagFixer extends AbstractProxyFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
public function getDefinition(): FixerDefinitionInterface
{
return new FixerDefinition(
@@ -81,10 +94,8 @@ final class Example
return parent::getPriority();
}
- public function configure(array $configuration): void
+ protected function configurePostNormalisation(): void
{
- parent::configure($configuration);
-
/** @var GeneralPhpdocTagRenameFixer $generalPhpdocTagRenameFixer */
$generalPhpdocTagRenameFixer = $this->proxyFixers['general_phpdoc_tag_rename'];
@@ -108,7 +119,7 @@ final class Example
{
return new FixerConfigurationResolver([
(new FixerOptionBuilder('replacements', 'Mapping between replaced annotations with new ones.'))
- ->setAllowedTypes(['string[]'])
+ ->setAllowedTypes(['array'])
->setDefault([
'property-read' => 'property',
'property-write' => 'property',
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocNoPackageFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocNoPackageFixer.php
index e254ad0c..3e769762 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocNoPackageFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocNoPackageFixer.php
@@ -60,7 +60,10 @@ class Baz
protected function createProxyFixers(): array
{
$fixer = new GeneralPhpdocAnnotationRemoveFixer();
- $fixer->configure(['annotations' => ['package', 'subpackage']]);
+ $fixer->configure([
+ 'annotations' => ['package', 'subpackage'],
+ 'case_sensitive' => true,
+ ]);
return [$fixer];
}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocOrderByValueFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocOrderByValueFixer.php
index be879093..66510c51 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocOrderByValueFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocOrderByValueFixer.php
@@ -17,6 +17,7 @@ namespace PhpCsFixer\Fixer\Phpdoc;
use PhpCsFixer\AbstractFixer;
use PhpCsFixer\DocBlock\DocBlock;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\AllowedValueSubset;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
@@ -32,9 +33,21 @@ use Symfony\Component\OptionsResolver\Options;
/**
* @author Filippo Tessarotto
* @author Andreas Möller
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * annotations?: list<'author'|'covers'|'coversNothing'|'dataProvider'|'depends'|'group'|'internal'|'method'|'mixin'|'property'|'property-read'|'property-write'|'requires'|'throws'|'uses'>
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * annotations: array{'author'?: 'author', 'covers'?: 'covers', 'coversNothing'?: 'coversnothing', 'dataProvider'?: 'dataprovider', 'depends'?: 'depends', 'group'?: 'group', 'internal'?: 'internal', 'method'?: 'method', 'mixin'?: 'mixin', 'property'?: 'property', 'property-read'?: 'property-read', 'property-write'?: 'property-write', 'requires'?: 'requires', 'throws'?: 'throws', 'uses'?: 'uses'}
+ * }
*/
final class PhpdocOrderByValueFixer extends AbstractFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
public function getDefinition(): FixerDefinitionInterface
{
return new FixerDefinition(
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocOrderFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocOrderFixer.php
index d858f535..d7423f5e 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocOrderFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocOrderFixer.php
@@ -17,6 +17,7 @@ namespace PhpCsFixer\Fixer\Phpdoc;
use PhpCsFixer\AbstractFixer;
use PhpCsFixer\DocBlock\DocBlock;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
@@ -30,9 +31,21 @@ use Symfony\Component\OptionsResolver\Exception\InvalidOptionsException;
/**
* @author Graham Campbell
* @author Jakub Kwaśniewski
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * order?: list
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * order: list
+ * }
*/
final class PhpdocOrderFixer extends AbstractFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
/**
* @const string[]
*
@@ -102,9 +115,6 @@ final class PhpdocOrderFixer extends AbstractFixer implements ConfigurableFixerI
protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
{
- /** @var list */
- $order = $this->configuration['order'];
-
foreach ($tokens as $index => $token) {
if (!$token->isGivenKind(T_DOC_COMMENT)) {
continue;
@@ -114,7 +124,8 @@ final class PhpdocOrderFixer extends AbstractFixer implements ConfigurableFixerI
$content = $token->getContent();
// sort annotations
- $successors = $order;
+ /** @var list */
+ $successors = $this->configuration['order'];
while (\count($successors) >= 3) {
$predecessor = array_shift($successors);
$content = $this->moveAnnotationsBefore($predecessor, $successors, $content);
@@ -122,7 +133,8 @@ final class PhpdocOrderFixer extends AbstractFixer implements ConfigurableFixerI
// we're parsing the content last time to make sure the internal
// state of the docblock is correct after the modifications
- $predecessors = $order;
+ /** @var list */
+ $predecessors = $this->configuration['order'];
$last = array_pop($predecessors);
$content = $this->moveAnnotationsAfter($last, $predecessors, $content);
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocReturnSelfReferenceFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocReturnSelfReferenceFixer.php
index 3c204954..4040702b 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocReturnSelfReferenceFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocReturnSelfReferenceFixer.php
@@ -17,6 +17,7 @@ namespace PhpCsFixer\Fixer\Phpdoc;
use PhpCsFixer\AbstractFixer;
use PhpCsFixer\DocBlock\DocBlock;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
@@ -30,8 +31,21 @@ use PhpCsFixer\Utils;
use Symfony\Component\OptionsResolver\Exception\InvalidOptionsException;
use Symfony\Component\OptionsResolver\Options;
+/**
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * replacements?: array
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * replacements: array
+ * }
+ */
final class PhpdocReturnSelfReferenceFixer extends AbstractFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
/**
* @var list
*/
@@ -135,7 +149,7 @@ class Sample
return new FixerConfigurationResolver([
(new FixerOptionBuilder('replacements', 'Mapping between replaced return types with new ones.'))
- ->setAllowedTypes(['string[]'])
+ ->setAllowedTypes(['array'])
->setNormalizer(static function (Options $options, array $value) use ($default): array {
$normalizedValue = [];
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocScalarFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocScalarFixer.php
index 70a6b323..626de718 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocScalarFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocScalarFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\Phpdoc;
use PhpCsFixer\AbstractPhpdocTypesFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\AllowedValueSubset;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
@@ -26,9 +27,21 @@ use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
/**
* @author Graham Campbell
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * types?: list<'boolean'|'callback'|'double'|'integer'|'real'|'str'>
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * types: list<'boolean'|'callback'|'double'|'integer'|'real'|'str'>
+ * }
*/
final class PhpdocScalarFixer extends AbstractPhpdocTypesFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
/**
* The types to fix.
*
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocSeparationFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocSeparationFixer.php
index 197bab67..7c2f1d91 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocSeparationFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocSeparationFixer.php
@@ -18,6 +18,7 @@ use PhpCsFixer\AbstractFixer;
use PhpCsFixer\DocBlock\Annotation;
use PhpCsFixer\DocBlock\DocBlock;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
@@ -32,9 +33,23 @@ use Symfony\Component\OptionsResolver\Exception\InvalidOptionsException;
/**
* @author Graham Campbell
* @author Jakub Kwaśniewski
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * groups?: list>,
+ * skip_unlisted_annotations?: bool
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * groups: list>,
+ * skip_unlisted_annotations: bool
+ * }
*/
final class PhpdocSeparationFixer extends AbstractFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
/**
* @internal
*
@@ -106,13 +121,6 @@ final class PhpdocSeparationFixer extends AbstractFixer implements ConfigurableF
);
}
- public function configure(array $configuration): void
- {
- parent::configure($configuration);
-
- $this->groups = $this->configuration['groups'];
- }
-
/**
* {@inheritdoc}
*
@@ -129,6 +137,11 @@ final class PhpdocSeparationFixer extends AbstractFixer implements ConfigurableF
return $tokens->isTokenKindFound(T_DOC_COMMENT);
}
+ protected function configurePostNormalisation(): void
+ {
+ $this->groups = $this->configuration['groups'];
+ }
+
protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
{
foreach ($tokens as $index => $token) {
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocTagCasingFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocTagCasingFixer.php
index a2a29e01..16ef2e88 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocTagCasingFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocTagCasingFixer.php
@@ -18,6 +18,7 @@ use PhpCsFixer\AbstractProxyFixer;
use PhpCsFixer\ConfigurationException\InvalidConfigurationException;
use PhpCsFixer\ConfigurationException\InvalidFixerConfigurationException;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
@@ -26,8 +27,21 @@ use PhpCsFixer\FixerDefinition\FixerDefinition;
use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
use PhpCsFixer\Preg;
+/**
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * tags?: list
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * tags: list
+ * }
+ */
final class PhpdocTagCasingFixer extends AbstractProxyFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
public function getDefinition(): FixerDefinitionInterface
{
return new FixerDefinition(
@@ -52,10 +66,8 @@ final class PhpdocTagCasingFixer extends AbstractProxyFixer implements Configura
return parent::getPriority();
}
- public function configure(array $configuration): void
+ protected function configurePostNormalisation(): void
{
- parent::configure($configuration);
-
$replacements = [];
foreach ($this->configuration['tags'] as $tag) {
$replacements[$tag] = $tag;
@@ -66,10 +78,10 @@ final class PhpdocTagCasingFixer extends AbstractProxyFixer implements Configura
try {
$generalPhpdocTagRenameFixer->configure([
+ 'case_sensitive' => false,
'fix_annotation' => true,
'fix_inline' => true,
'replacements' => $replacements,
- 'case_sensitive' => false,
]);
} catch (InvalidConfigurationException $exception) {
throw new InvalidFixerConfigurationException(
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocTagTypeFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocTagTypeFixer.php
index 54b6e2ae..bf2e0102 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocTagTypeFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocTagTypeFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\Phpdoc;
use PhpCsFixer\AbstractFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
@@ -28,8 +29,21 @@ use PhpCsFixer\Tokenizer\Tokens;
use Symfony\Component\OptionsResolver\Exception\InvalidOptionsException;
use Symfony\Component\OptionsResolver\Options;
+/**
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * tags?: array
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * tags: array
+ * }
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ */
final class PhpdocTagTypeFixer extends AbstractFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
private const TAG_REGEX = '/^(?:
(?
(?:@(?.+?)(?:\s.+)?)
@@ -135,7 +149,7 @@ final class PhpdocTagTypeFixer extends AbstractFixer implements ConfigurableFixe
{
return new FixerConfigurationResolver([
(new FixerOptionBuilder('tags', 'The list of tags to fix.'))
- ->setAllowedTypes(['string[]'])
+ ->setAllowedTypes(["array"])
->setAllowedValues([static function (array $value): bool {
foreach ($value as $type) {
if (!\in_array($type, ['annotation', 'inline'], true)) {
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocToCommentFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocToCommentFixer.php
index 389f8d5d..08e35740 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocToCommentFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocToCommentFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\Phpdoc;
use PhpCsFixer\AbstractFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
@@ -30,9 +31,23 @@ use PhpCsFixer\Tokenizer\Tokens;
/**
* @author Ceeram
* @author Dariusz Rumiński
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * allow_before_return_statement?: bool,
+ * ignored_tags?: list
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * allow_before_return_statement: bool,
+ * ignored_tags: list
+ * }
*/
final class PhpdocToCommentFixer extends AbstractFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
/**
* @var list
*/
@@ -111,10 +126,8 @@ function returnClassName() {
);
}
- public function configure(array $configuration): void
+ protected function configurePostNormalisation(): void
{
- parent::configure($configuration);
-
$this->ignoredTags = array_map(
static fn (string $tag): string => strtolower($tag),
$this->configuration['ignored_tags']
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocTypesFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocTypesFixer.php
index a1dba965..e26e8a0c 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocTypesFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocTypesFixer.php
@@ -16,6 +16,7 @@ namespace PhpCsFixer\Fixer\Phpdoc;
use PhpCsFixer\AbstractPhpdocTypesFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
use PhpCsFixer\FixerConfiguration\AllowedValueSubset;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
@@ -28,9 +29,21 @@ use PhpCsFixer\Preg;
/**
* @author Graham Campbell
* @author Dariusz Rumiński
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * groups?: list<'alias'|'meta'|'simple'>
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * groups: list<'alias'|'meta'|'simple'>
+ * }
*/
final class PhpdocTypesFixer extends AbstractPhpdocTypesFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
/**
* Available types, grouped.
*
@@ -70,15 +83,6 @@ final class PhpdocTypesFixer extends AbstractPhpdocTypesFixer implements Configu
/** @var array