Skip to content

Commit

Permalink
Merge branch 'master' into chore
Browse files Browse the repository at this point in the history
  • Loading branch information
keradus authored Nov 18, 2024
2 parents 87dcbf7 + e37cb56 commit 905eb09
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 6 deletions.
6 changes: 2 additions & 4 deletions src/AbstractDoctrineAnnotationFixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,10 @@
* @internal
*
* @phpstan-type _AutogeneratedInputConfiguration array{
* scalar_types?: bool,
* union_types?: bool
* ignored_tags?: list<string>
* }
* @phpstan-type _AutogeneratedComputedConfiguration array{
* scalar_types: bool,
* union_types: bool
* ignored_tags: list<string>
* }
*
* @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
Expand Down
2 changes: 1 addition & 1 deletion src/Console/Command/DescribeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ final class DescribeCommand extends Command
private FixerFactory $fixerFactory;

/**
* @var array<string, FixerInterface>
* @var null|array<string, FixerInterface>
*/
private $fixers;

Expand Down
19 changes: 18 additions & 1 deletion src/Fixer/Internal/ConfigurableFixerTemplateFixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
use PhpCsFixer\AbstractPhpdocToTypeDeclarationFixer;
use PhpCsFixer\Console\Command\HelpCommand;
use PhpCsFixer\DocBlock\DocBlock;
use PhpCsFixer\Doctrine\Annotation\Tokens as DoctrineAnnotationTokens;
use PhpCsFixer\Fixer\AttributeNotation\OrderedAttributesFixer;
use PhpCsFixer\Fixer\Casing\ConstantCaseFixer;
use PhpCsFixer\Fixer\ClassNotation\FinalInternalClassFixer;
Expand All @@ -36,6 +37,7 @@
use PhpCsFixer\Fixer\Phpdoc\PhpdocTagTypeFixer;
use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
use PhpCsFixer\FixerConfiguration\AllowedValueSubset;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
use PhpCsFixer\FixerDefinition\CodeSample;
use PhpCsFixer\FixerDefinition\FixerDefinition;
use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
Expand Down Expand Up @@ -525,7 +527,7 @@ public function isCandidate(Tokens $tokens): bool
}
};
} elseif (AbstractDoctrineAnnotationFixer::class === $className) {
return new class extends AbstractPhpdocToTypeDeclarationFixer {
return new class extends AbstractDoctrineAnnotationFixer {
protected function isSkippedType(string $type): bool
{
throw new \LogicException('Not implemented.');
Expand All @@ -550,6 +552,21 @@ public function isCandidate(Tokens $tokens): bool
{
throw new \LogicException('Not implemented.');
}

public function configure(array $configuration): void
{
// void
}

protected function fixAnnotations(DoctrineAnnotationTokens $doctrineAnnotationTokens): void
{
throw new \LogicException('Not implemented.');
}

public function getConfigurationDefinition(): FixerConfigurationResolverInterface
{
return $this->createConfigurationDefinition();
}
};
}

Expand Down

0 comments on commit 905eb09

Please sign in to comment.