diff --git a/config/sets/symfony/symfony3/symfony33/symfony33-framework-bundle.php b/config/sets/symfony/symfony3/symfony33/symfony33-framework-bundle.php index 3cfe7b001..34ebb921b 100644 --- a/config/sets/symfony/symfony3/symfony33/symfony33-framework-bundle.php +++ b/config/sets/symfony/symfony3/symfony33/symfony33-framework-bundle.php @@ -12,7 +12,7 @@ 'Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\SerializerPass' => 'Symfony\Component\Serializer\DependencyInjection\SerializerPass', 'Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\FormPass' => 'Symfony\Component\Form\DependencyInjection\FormPass', 'Symfony\Bundle\FrameworkBundle\EventListener\SessionListener' => 'Symfony\Component\HttpKernel\EventListener\SessionListener', - 'Symfony\Bundle\FrameworkBundle\EventListener\TestSessionListenr' => 'Symfony\Component\HttpKernel\EventListener\TestSessionListener', + 'Symfony\Bundle\FrameworkBundle\EventListener\TestSessionListener' => 'Symfony\Component\HttpKernel\EventListener\TestSessionListener', 'Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\ConfigCachePass' => 'Symfony\Component\Config\DependencyInjection\ConfigCachePass', 'Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\PropertyInfoPass' => 'Symfony\Component\PropertyInfo\DependencyInjection\PropertyInfoPass', ]); diff --git a/config/sets/symfony/symfony5/symfony51/symfony51-dependency-injection.php b/config/sets/symfony/symfony5/symfony51/symfony51-dependency-injection.php index 593b257ca..e531f7ffc 100644 --- a/config/sets/symfony/symfony5/symfony51/symfony51-dependency-injection.php +++ b/config/sets/symfony/symfony5/symfony51/symfony51-dependency-injection.php @@ -9,8 +9,8 @@ return static function (RectorConfig $rectorConfig): void { $rectorConfig->ruleWithConfiguration(RenameFunctionRector::class, [ - 'Symfony\Component\DependencyInjection\Loader\Configuraton\inline' => 'Symfony\Component\DependencyInjection\Loader\Configuraton\inline_service', - 'Symfony\Component\DependencyInjection\Loader\Configuraton\ref' => 'Symfony\Component\DependencyInjection\Loader\Configuraton\service', + 'Symfony\Component\DependencyInjection\Loader\Configurator\inline' => 'Symfony\Component\DependencyInjection\Loader\Configurator\inline_service', + 'Symfony\Component\DependencyInjection\Loader\Configurator\ref' => 'Symfony\Component\DependencyInjection\Loader\Configurator\service', ]); $rectorConfig->ruleWithConfiguration(RenameMethodRector::class, [ diff --git a/rules-tests/CodeQuality/Rector/ClassMethod/TemplateAnnotationToThisRenderRector/Fixture/remove_template_annotation.php.inc b/rules-tests/CodeQuality/Rector/ClassMethod/TemplateAnnotationToThisRenderRector/Fixture/remove_template_annotation.php.inc index 8c2d625c6..0acbdf9f7 100644 --- a/rules-tests/CodeQuality/Rector/ClassMethod/TemplateAnnotationToThisRenderRector/Fixture/remove_template_annotation.php.inc +++ b/rules-tests/CodeQuality/Rector/ClassMethod/TemplateAnnotationToThisRenderRector/Fixture/remove_template_annotation.php.inc @@ -6,7 +6,7 @@ use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\Response; -class RemoveTemplateAnnotatoinController extends AbstractController +class RemoveTemplateAnnotationController extends AbstractController { /** * @Template() @@ -27,7 +27,7 @@ use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\Response; -class RemoveTemplateAnnotatoinController extends AbstractController +class RemoveTemplateAnnotationController extends AbstractController { public function indexAction(): \Symfony\Component\HttpFoundation\Response { diff --git a/rules-tests/CodeQuality/Rector/Class_/EventListenerToEventSubscriberRector/config/config_with_parameter.php b/rules-tests/CodeQuality/Rector/Class_/EventListenerToEventSubscriberRector/config/config_with_parameter.php index 0716f2623..d139b7434 100644 --- a/rules-tests/CodeQuality/Rector/Class_/EventListenerToEventSubscriberRector/config/config_with_parameter.php +++ b/rules-tests/CodeQuality/Rector/Class_/EventListenerToEventSubscriberRector/config/config_with_parameter.php @@ -6,7 +6,7 @@ use Rector\Symfony\CodeQuality\Rector\Class_\EventListenerToEventSubscriberRector; return static function (RectorConfig $rectorConfig): void { - // wtf: all test have to be in single file due to autoloading race-condigition and container creating issue of fixture + // wtf: all test have to be in single file due to autoloading race condition and container creating issue of fixture $rectorConfig->symfonyContainerXml(__DIR__ . '/listener_services.xml'); $rectorConfig->rule(EventListenerToEventSubscriberRector::class); }; diff --git a/rules-tests/Symfony40/Rector/ConstFetch/ConstraintUrlOptionRector/Fixture/fixture.php.inc b/rules-tests/Symfony40/Rector/ConstFetch/ConstraintUrlOptionRector/Fixture/fixture.php.inc index cf0a3351a..a9c60eb87 100644 --- a/rules-tests/Symfony40/Rector/ConstFetch/ConstraintUrlOptionRector/Fixture/fixture.php.inc +++ b/rules-tests/Symfony40/Rector/ConstFetch/ConstraintUrlOptionRector/Fixture/fixture.php.inc @@ -6,7 +6,7 @@ use Symfony\Component\Validator\Constraints\Url; function constraintUrlOptionRector() { - $containt = new Url(['checkDNS' => true]); + $constraint = new Url(['checkDNS' => true]); } ?> @@ -19,7 +19,7 @@ use Symfony\Component\Validator\Constraints\Url; function constraintUrlOptionRector() { - $containt = new Url(['checkDNS' => \Symfony\Component\Validator\Constraints\Url::CHECK_DNS_TYPE_ANY]); + $constraint = new Url(['checkDNS' => \Symfony\Component\Validator\Constraints\Url::CHECK_DNS_TYPE_ANY]); } ?> diff --git a/rules-tests/Symfony40/Rector/ConstFetch/ConstraintUrlOptionRector/Fixture/skip_another_url.php.inc b/rules-tests/Symfony40/Rector/ConstFetch/ConstraintUrlOptionRector/Fixture/skip_another_url.php.inc index 0cdfa094b..4cf4bc80f 100644 --- a/rules-tests/Symfony40/Rector/ConstFetch/ConstraintUrlOptionRector/Fixture/skip_another_url.php.inc +++ b/rules-tests/Symfony40/Rector/ConstFetch/ConstraintUrlOptionRector/Fixture/skip_another_url.php.inc @@ -4,5 +4,5 @@ namespace Rector\Symfony\Tests\Symfony40\Rector\ConstFetch\ConstraintUrlOptionRe function constraintUrlOptionRector() { - $containt = new Url(['checkDNS' => true]); + $constraint = new Url(['checkDNS' => true]); } diff --git a/rules-tests/Symfony42/Rector/New_/StringToArrayArgumentProcessRector/Fixture/fixture2.php.inc b/rules-tests/Symfony42/Rector/New_/StringToArrayArgumentProcessRector/Fixture/fixture2.php.inc index 5f18b83f7..e4242ecaf 100644 --- a/rules-tests/Symfony42/Rector/New_/StringToArrayArgumentProcessRector/Fixture/fixture2.php.inc +++ b/rules-tests/Symfony42/Rector/New_/StringToArrayArgumentProcessRector/Fixture/fixture2.php.inc @@ -7,10 +7,10 @@ use Symfony\Component\Console\Output\ConsoleOutput; function stringToArgumentArray2() { - $procesHelper = new ProcessHelper(); + $processHelper = new ProcessHelper(); $output = new ConsoleOutput(); - $procesHelper->run($output, 'ls -l'); + $processHelper->run($output, 'ls -l'); } ?> @@ -24,10 +24,10 @@ use Symfony\Component\Console\Output\ConsoleOutput; function stringToArgumentArray2() { - $procesHelper = new ProcessHelper(); + $processHelper = new ProcessHelper(); $output = new ConsoleOutput(); - $procesHelper->run($output, ['ls', '-l']); + $processHelper->run($output, ['ls', '-l']); } ?> diff --git a/rules-tests/Symfony43/Rector/MethodCall/MakeDispatchFirstArgumentEventRector/Fixture/fixture.php.inc b/rules-tests/Symfony43/Rector/MethodCall/MakeDispatchFirstArgumentEventRector/Fixture/fixture.php.inc index 28e348813..c75f15ba8 100644 --- a/rules-tests/Symfony43/Rector/MethodCall/MakeDispatchFirstArgumentEventRector/Fixture/fixture.php.inc +++ b/rules-tests/Symfony43/Rector/MethodCall/MakeDispatchFirstArgumentEventRector/Fixture/fixture.php.inc @@ -6,11 +6,11 @@ use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; class SomeClass { - public function run(EventDispatcherInterface $eventDisptacher) + public function run(EventDispatcherInterface $eventDispatcher) { - $eventDisptacher->dispatch('event_name', new Event()); + $eventDispatcher->dispatch('event_name', new Event()); - $eventDisptacher->dispatch(new Event(), 'event_name'); + $eventDispatcher->dispatch(new Event(), 'event_name'); } } @@ -24,11 +24,11 @@ use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; class SomeClass { - public function run(EventDispatcherInterface $eventDisptacher) + public function run(EventDispatcherInterface $eventDispatcher) { - $eventDisptacher->dispatch(new Event(), 'event_name'); + $eventDispatcher->dispatch(new Event(), 'event_name'); - $eventDisptacher->dispatch(new Event(), 'event_name'); + $eventDispatcher->dispatch(new Event(), 'event_name'); } } diff --git a/rules-tests/Symfony52/Rector/MethodCall/FormBuilderSetDataMapperRector/Fixture/form_trait_data_mapper.php.inc b/rules-tests/Symfony52/Rector/MethodCall/FormBuilderSetDataMapperRector/Fixture/form_trait_data_mapper.php.inc index 5463ba654..8e79617a8 100644 --- a/rules-tests/Symfony52/Rector/MethodCall/FormBuilderSetDataMapperRector/Fixture/form_trait_data_mapper.php.inc +++ b/rules-tests/Symfony52/Rector/MethodCall/FormBuilderSetDataMapperRector/Fixture/form_trait_data_mapper.php.inc @@ -2,7 +2,7 @@ use Symfony\Component\Form\FormBuilderInterface; -trait FormTraitDataMappter +trait FormTraitDataMapper { public function buildForm(FormBuilderInterface $builder, array $options): void { diff --git a/rules-tests/Symfony52/Rector/MethodCall/ValidatorBuilderEnableAnnotationMappingRector/Fixture/skip_not_enable_annotation_mapping.php.inc b/rules-tests/Symfony52/Rector/MethodCall/ValidatorBuilderEnableAnnotationMappingRector/Fixture/skip_not_enable_annotation_mapping.php.inc index ae7112b00..3781bd3f7 100644 --- a/rules-tests/Symfony52/Rector/MethodCall/ValidatorBuilderEnableAnnotationMappingRector/Fixture/skip_not_enable_annotation_mapping.php.inc +++ b/rules-tests/Symfony52/Rector/MethodCall/ValidatorBuilderEnableAnnotationMappingRector/Fixture/skip_not_enable_annotation_mapping.php.inc @@ -4,7 +4,7 @@ namespace Rector\Symfony\Tests\Symfony52\Rector\MethodCall\ValidatorBuilderEnabl use Symfony\Component\Validator\ValidatorBuilder; -class SkipNotEnableAnnotatinoMapping +class SkipNotEnableAnnotationMapping { public function run(ValidatorBuilder $builder) { diff --git a/rules-tests/Symfony62/Rector/Class_/MessageHandlerInterfaceToAttributeRector/Fixture/only_remove_interface_from_abstract_class.php.inc b/rules-tests/Symfony62/Rector/Class_/MessageHandlerInterfaceToAttributeRector/Fixture/only_remove_interface_from_abstract_class.php.inc index f2d705321..26d118d8a 100644 --- a/rules-tests/Symfony62/Rector/Class_/MessageHandlerInterfaceToAttributeRector/Fixture/only_remove_interface_from_abstract_class.php.inc +++ b/rules-tests/Symfony62/Rector/Class_/MessageHandlerInterfaceToAttributeRector/Fixture/only_remove_interface_from_abstract_class.php.inc @@ -4,7 +4,7 @@ namespace Rector\Symfony\Tests\Symfony62\Rector\Class_\MessageHandlerInterfaceTo use Symfony\Component\Messenger\Handler\MessageHandlerInterface; -abstract class OnlyRemoveInterfaceFromAbstactClass implements MessageHandlerInterface +abstract class OnlyRemoveInterfaceFromAbstractClass implements MessageHandlerInterface { } @@ -16,7 +16,7 @@ namespace Rector\Symfony\Tests\Symfony62\Rector\Class_\MessageHandlerInterfaceTo use Symfony\Component\Messenger\Handler\MessageHandlerInterface; -abstract class OnlyRemoveInterfaceFromAbstactClass +abstract class OnlyRemoveInterfaceFromAbstractClass { } diff --git a/rules/CodeQuality/Rector/AttributeGroup/SingleConditionSecurityAttributeToIsGrantedRector.php b/rules/CodeQuality/Rector/AttributeGroup/SingleConditionSecurityAttributeToIsGrantedRector.php index e956e95e3..a6a163a28 100644 --- a/rules/CodeQuality/Rector/AttributeGroup/SingleConditionSecurityAttributeToIsGrantedRector.php +++ b/rules/CodeQuality/Rector/AttributeGroup/SingleConditionSecurityAttributeToIsGrantedRector.php @@ -32,7 +32,7 @@ public function __construct( public function getRuleDefinition(): RuleDefinition { return new RuleDefinition( - 'Narrow #[Security] attribute with inner sigle "is_granted/has_role" condition string to #[IsGranted] attribute', + 'Narrow #[Security] attribute with inner single "is_granted/has_role" condition string to #[IsGranted] attribute', [ new CodeSample( <<<'CODE_SAMPLE' diff --git a/rules/Configs/Rector/Closure/ServiceArgsToServiceNamedArgRector.php b/rules/Configs/Rector/Closure/ServiceArgsToServiceNamedArgRector.php index 72a21f013..1e0436518 100644 --- a/rules/Configs/Rector/Closure/ServiceArgsToServiceNamedArgRector.php +++ b/rules/Configs/Rector/Closure/ServiceArgsToServiceNamedArgRector.php @@ -238,7 +238,7 @@ private function resolveParameterPosition(ArrayItem $arrayItem, int $key): int return $this->valueResolver->getValue($arrayItem->key); } - // fallbakc in case of empty array item + // fallback in case of empty array item return $key; } } diff --git a/rules/DependencyInjection/NodeDecorator/CommandConstructorDecorator.php b/rules/DependencyInjection/NodeDecorator/CommandConstructorDecorator.php index e73f80d2a..ad3f6e7fd 100644 --- a/rules/DependencyInjection/NodeDecorator/CommandConstructorDecorator.php +++ b/rules/DependencyInjection/NodeDecorator/CommandConstructorDecorator.php @@ -30,15 +30,15 @@ public function decorate(Class_ $class): void return; } - $constuctClassMethod = $class->getMethod(MethodName::CONSTRUCT); - if (! $constuctClassMethod instanceof ClassMethod) { + $constructClassMethod = $class->getMethod(MethodName::CONSTRUCT); + if (! $constructClassMethod instanceof ClassMethod) { return; } // empty stmts? add parent::__construct() to setup command - if ((array) $constuctClassMethod->stmts === []) { + if ((array) $constructClassMethod->stmts === []) { $parentConstructStaticCall = new StaticCall(new Name('parent'), '__construct'); - $constuctClassMethod->stmts[] = new Expression($parentConstructStaticCall); + $constructClassMethod->stmts[] = new Expression($parentConstructStaticCall); } } } diff --git a/rules/Symfony43/Rector/ClassMethod/EventDispatcherParentConstructRector.php b/rules/Symfony43/Rector/ClassMethod/EventDispatcherParentConstructRector.php index 341b4409b..cde7f2945 100644 --- a/rules/Symfony43/Rector/ClassMethod/EventDispatcherParentConstructRector.php +++ b/rules/Symfony43/Rector/ClassMethod/EventDispatcherParentConstructRector.php @@ -109,7 +109,7 @@ private function createParentStaticCall(string $method): Expression } /** - * Looks for "parent:: + * Looks for "parent::" */ private function hasParentCallOfMethod(ClassMethod $classMethod, string $method): bool { diff --git a/rules/Symfony73/GetMethodToAsTwigAttributeTransformer.php b/rules/Symfony73/GetMethodToAsTwigAttributeTransformer.php index 7b705c3f0..73fdde95f 100644 --- a/rules/Symfony73/GetMethodToAsTwigAttributeTransformer.php +++ b/rules/Symfony73/GetMethodToAsTwigAttributeTransformer.php @@ -100,7 +100,7 @@ public function transformClassGetMethodToAttributeMarker( $this->decorateMethodWithAttribute($localMethod, $attributeClass, $nameArg); $this->visibilityManipulator->makePublic($localMethod); - // remove old new fuction instance + // remove old new function instance unset($returnArray->items[$key]); $hasChanged = true; diff --git a/src/NodeAnalyzer/FormInstanceToFormClassConstFetchConverter.php b/src/NodeAnalyzer/FormInstanceToFormClassConstFetchConverter.php index 2369519bd..cb8f4b2b7 100644 --- a/src/NodeAnalyzer/FormInstanceToFormClassConstFetchConverter.php +++ b/src/NodeAnalyzer/FormInstanceToFormClassConstFetchConverter.php @@ -40,8 +40,8 @@ public function processNewInstance(MethodCall $methodCall, int $position, int $o return null; } - // better skip and ahndle manualyl - if ($argValue instanceof Variable && $this->isVariableOfTypeWithRequiredConstructorParmaeters($argValue)) { + // better skip and handle manually + if ($argValue instanceof Variable && $this->isVariableOfTypeWithRequiredConstructorParameters($argValue)) { return null; } @@ -67,7 +67,7 @@ public function processNewInstance(MethodCall $methodCall, int $position, int $o return $methodCall; } - private function isVariableOfTypeWithRequiredConstructorParmaeters(Variable $variable): bool + private function isVariableOfTypeWithRequiredConstructorParameters(Variable $variable): bool { // if form type is object with constructor args, handle manually $variableType = $this->nodeTypeResolver->getType($variable); diff --git a/tests/Set/Symfony61/Fixture/replace_deprecated_interfaces_serializer.php.inc b/tests/Set/Symfony61/Fixture/replace_deprecated_interfaces_serializer.php.inc index 8e49a4527..8e10da70f 100644 --- a/tests/Set/Symfony61/Fixture/replace_deprecated_interfaces_serializer.php.inc +++ b/tests/Set/Symfony61/Fixture/replace_deprecated_interfaces_serializer.php.inc @@ -7,7 +7,7 @@ use Symfony\Component\Serializer\Normalizer\ContextAwareNormalizerInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ReplaceDepricatedInterfacesSerializer implements DenormalizerInterface, NormalizerInterface, ContextAwareNormalizerInterface, ContextAwareDenormalizerInterface +class ReplaceDeprecatedInterfacesSerializer implements DenormalizerInterface, NormalizerInterface, ContextAwareNormalizerInterface, ContextAwareDenormalizerInterface { } @@ -22,7 +22,7 @@ use Symfony\Component\Serializer\Normalizer\ContextAwareNormalizerInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ReplaceDepricatedInterfacesSerializer implements DenormalizerInterface, NormalizerInterface +class ReplaceDeprecatedInterfacesSerializer implements DenormalizerInterface, NormalizerInterface { }