From 08fb696dbc30ffcf35e1f63d1418dbd4948f7ff1 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Mon, 4 Jan 2021 16:44:05 +0100 Subject: [PATCH] fix code style --- .../Tests/DependencyInjection/Fixtures/php/full.php | 2 +- .../Tests/DependencyInjection/Fixtures/php/workflows.php | 2 +- .../Tests/Fixtures/ClassAliasExampleClass.php | 2 +- .../FrameworkBundle/Tests/Fixtures/Validation/Category.php | 2 +- .../Component/Cache/Tests/Adapter/PdoDbalAdapterTest.php | 1 - src/Symfony/Component/Config/Definition/Processor.php | 4 ++-- .../Component/Console/Tests/Fixtures/DummyOutput.php | 2 +- .../Component/DependencyInjection/Dumper/PhpDumper.php | 1 - .../Component/DependencyInjection/Loader/XmlFileLoader.php | 2 +- .../Component/DependencyInjection/Loader/YamlFileLoader.php | 2 +- .../Tests/Fixtures/CheckTypeDeclarationsPass/Foo.php | 2 +- .../DependencyInjection/Tests/Fixtures/FactoryDummy.php | 2 +- .../MultipleArgumentsOptionalScalarNotReallyOptional.php | 1 - .../DataTransformer/PercentToLocalizedStringTransformer.php | 2 +- src/Symfony/Component/Form/Extension/Core/Type/TimeType.php | 2 +- src/Symfony/Component/HttpFoundation/JsonResponse.php | 2 +- src/Symfony/Component/HttpFoundation/RedirectResponse.php | 2 +- src/Symfony/Component/HttpFoundation/Response.php | 2 +- src/Symfony/Component/HttpFoundation/StreamedResponse.php | 2 +- src/Symfony/Component/Ldap/Tests/LdapTestCase.php | 2 +- .../Mailer/Bridge/Amazon/Transport/SesTransportFactory.php | 2 +- src/Symfony/Component/Mailer/Tests/TransportTest.php | 2 +- .../Messenger/Bridge/Amqp/Tests/Fixtures/long_receiver.php | 6 +++--- .../Bridge/Doctrine/Tests/Transport/ConnectionTest.php | 2 +- src/Symfony/Component/Messenger/RoutableMessageBus.php | 2 +- .../Component/Mime/Test/Constraint/EmailAddressContains.php | 2 +- .../Security/Http/Authenticator/AbstractAuthenticator.php | 2 +- .../Serializer/Tests/Fixtures/AbstractNormalizerDummy.php | 2 +- .../Tests/Mapping/Loader/AnnotationLoaderTest.php | 2 +- 29 files changed, 29 insertions(+), 32 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/full.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/full.php index b11b5e08dc..665d0f213b 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/full.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/full.php @@ -50,7 +50,7 @@ $container->loadFromExtension('framework', [ 'fallback' => 'fr', 'paths' => ['%kernel.project_dir%/Fixtures/translations'], 'cache_dir' => '%kernel.cache_dir%/translations', - 'enabled_locales' => ['fr', 'en'] + 'enabled_locales' => ['fr', 'en'], ], 'validation' => [ 'enabled' => true, diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/workflows.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/workflows.php index d0abe507e5..995fabffe3 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/workflows.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/workflows.php @@ -12,7 +12,7 @@ $container->loadFromExtension('framework', [ 'initial_marking' => ['draft'], 'metadata' => [ 'title' => 'article workflow', - 'description' => 'workflow for articles' + 'description' => 'workflow for articles', ], 'places' => [ 'draft', diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/ClassAliasExampleClass.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/ClassAliasExampleClass.php index c129865859..8303dc6ea1 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/ClassAliasExampleClass.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/ClassAliasExampleClass.php @@ -4,7 +4,7 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Fixtures; class_alias( ClassAliasTargetClass::class, - __NAMESPACE__ . '\ClassAliasExampleClass' + __NAMESPACE__.'\ClassAliasExampleClass' ); if (false) { diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Validation/Category.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Validation/Category.php index 115320f667..6d9539cc58 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Validation/Category.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Validation/Category.php @@ -6,7 +6,7 @@ use Symfony\Component\Validator\Constraints as Assert; class Category { - const NAME_PATTERN = '/\w+/'; + public const NAME_PATTERN = '/\w+/'; public $id; diff --git a/src/Symfony/Component/Cache/Tests/Adapter/PdoDbalAdapterTest.php b/src/Symfony/Component/Cache/Tests/Adapter/PdoDbalAdapterTest.php index 648e4313d8..82441bdbc4 100644 --- a/src/Symfony/Component/Cache/Tests/Adapter/PdoDbalAdapterTest.php +++ b/src/Symfony/Component/Cache/Tests/Adapter/PdoDbalAdapterTest.php @@ -15,7 +15,6 @@ use Doctrine\DBAL\Connection; use Doctrine\DBAL\Driver\AbstractMySQLDriver; use Doctrine\DBAL\DriverManager; use Doctrine\DBAL\Schema\Schema; -use Doctrine\DBAL\Version; use Psr\Cache\CacheItemPoolInterface; use Symfony\Component\Cache\Adapter\PdoAdapter; use Symfony\Component\Cache\Tests\Traits\PdoPruneableTrait; diff --git a/src/Symfony/Component/Config/Definition/Processor.php b/src/Symfony/Component/Config/Definition/Processor.php index 76f4700473..1bb6d795e5 100644 --- a/src/Symfony/Component/Config/Definition/Processor.php +++ b/src/Symfony/Component/Config/Definition/Processor.php @@ -84,10 +84,10 @@ class Processor if (isset($config[$key])) { if (\is_string($config[$key]) || !\is_int(key($config[$key]))) { // only one - return [$config[$key]]; + return [$config[$key]]; } - return $config[$key]; + return $config[$key]; } return []; diff --git a/src/Symfony/Component/Console/Tests/Fixtures/DummyOutput.php b/src/Symfony/Component/Console/Tests/Fixtures/DummyOutput.php index 96de7e7189..44b39e30b4 100644 --- a/src/Symfony/Component/Console/Tests/Fixtures/DummyOutput.php +++ b/src/Symfony/Component/Console/Tests/Fixtures/DummyOutput.php @@ -23,7 +23,7 @@ class DummyOutput extends BufferedOutput public function getLogs(): array { $logs = []; - foreach (explode(PHP_EOL, trim($this->fetch())) as $message) { + foreach (explode(\PHP_EOL, trim($this->fetch())) as $message) { preg_match('/^\[(.*)\] (.*)/', $message, $matches); $logs[] = sprintf('%s %s', $matches[1], $matches[2]); } diff --git a/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php b/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php index 53925bf0bf..c91f8d58d2 100644 --- a/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php +++ b/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php @@ -21,7 +21,6 @@ use Symfony\Component\DependencyInjection\Argument\ServiceLocator; use Symfony\Component\DependencyInjection\Argument\ServiceLocatorArgument; use Symfony\Component\DependencyInjection\Compiler\AnalyzeServiceReferencesPass; use Symfony\Component\DependencyInjection\Compiler\CheckCircularReferencesPass; -use Symfony\Component\DependencyInjection\Compiler\ServiceReferenceGraphEdge; use Symfony\Component\DependencyInjection\Compiler\ServiceReferenceGraphNode; use Symfony\Component\DependencyInjection\Container; use Symfony\Component\DependencyInjection\ContainerBuilder; diff --git a/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php b/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php index d99217bde6..a70b12a279 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php +++ b/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php @@ -478,7 +478,7 @@ class XmlFileLoader extends FileLoader break; case 'expression': if (!class_exists(Expression::class)) { - throw new \LogicException(sprintf('The type="expression" attribute cannot be used without the ExpressionLanguage component. Try running "composer require symfony/expression-language".')); + throw new \LogicException('The type="expression" attribute cannot be used without the ExpressionLanguage component. Try running "composer require symfony/expression-language".'); } $arguments[$key] = new Expression($arg->nodeValue); diff --git a/src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php b/src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php index 112736c401..903b15ac84 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php +++ b/src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php @@ -868,7 +868,7 @@ class YamlFileLoader extends FileLoader } } elseif (\is_string($value) && 0 === strpos($value, '@=')) { if (!class_exists(Expression::class)) { - throw new \LogicException(sprintf('The "@=" expression syntax cannot be used without the ExpressionLanguage component. Try running "composer require symfony/expression-language".')); + throw new \LogicException('The "@=" expression syntax cannot be used without the ExpressionLanguage component. Try running "composer require symfony/expression-language".'); } return new Expression(substr($value, 2)); diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/CheckTypeDeclarationsPass/Foo.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/CheckTypeDeclarationsPass/Foo.php index 34998824c5..be92ec5c29 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/CheckTypeDeclarationsPass/Foo.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/CheckTypeDeclarationsPass/Foo.php @@ -16,7 +16,7 @@ class Foo public static function createCallable(): callable { - return function() {}; + return function () {}; } public static function createArray(): array diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/FactoryDummy.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/FactoryDummy.php index b7ceac7d8a..ad4d62ad0e 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/FactoryDummy.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/FactoryDummy.php @@ -13,7 +13,7 @@ namespace Symfony\Component\DependencyInjection\Tests\Fixtures; class FactoryDummy extends FactoryParent { - public static function createFactory(): FactoryDummy + public static function createFactory(): self { } diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/MultipleArgumentsOptionalScalarNotReallyOptional.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/MultipleArgumentsOptionalScalarNotReallyOptional.php index dcaaacc1f4..754470a413 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/MultipleArgumentsOptionalScalarNotReallyOptional.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/MultipleArgumentsOptionalScalarNotReallyOptional.php @@ -11,4 +11,3 @@ class MultipleArgumentsOptionalScalarNotReallyOptional { } } - diff --git a/src/Symfony/Component/Form/Extension/Core/DataTransformer/PercentToLocalizedStringTransformer.php b/src/Symfony/Component/Form/Extension/Core/DataTransformer/PercentToLocalizedStringTransformer.php index 61b2e20de3..46e01f3309 100644 --- a/src/Symfony/Component/Form/Extension/Core/DataTransformer/PercentToLocalizedStringTransformer.php +++ b/src/Symfony/Component/Form/Extension/Core/DataTransformer/PercentToLocalizedStringTransformer.php @@ -204,7 +204,7 @@ class PercentToLocalizedStringTransformer implements DataTransformerInterface { if (null !== $this->scale && null !== $this->roundingMode) { // shift number to maintain the correct scale during rounding - $roundingCoef = pow(10, $this->scale); + $roundingCoef = 10 ** $this->scale; if (self::FRACTIONAL == $this->type) { $roundingCoef *= 100; diff --git a/src/Symfony/Component/Form/Extension/Core/Type/TimeType.php b/src/Symfony/Component/Form/Extension/Core/Type/TimeType.php index 56718c827b..b71eced783 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/TimeType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/TimeType.php @@ -340,7 +340,7 @@ class TimeType extends AbstractType $resolver->setNormalizer('view_timezone', function (Options $options, $viewTimezone): ?string { if (null !== $options['model_timezone'] && $viewTimezone !== $options['model_timezone'] && null === $options['reference_date']) { - throw new LogicException(sprintf('Using different values for the "model_timezone" and "view_timezone" options without configuring a reference date is not supported.')); + throw new LogicException('Using different values for the "model_timezone" and "view_timezone" options without configuring a reference date is not supported.'); } return $viewTimezone; diff --git a/src/Symfony/Component/HttpFoundation/JsonResponse.php b/src/Symfony/Component/HttpFoundation/JsonResponse.php index ff317a734a..5d73c6faed 100644 --- a/src/Symfony/Component/HttpFoundation/JsonResponse.php +++ b/src/Symfony/Component/HttpFoundation/JsonResponse.php @@ -72,7 +72,7 @@ class JsonResponse extends Response */ public static function create($data = null, int $status = 200, array $headers = []) { - trigger_deprecation('symfony/http-foundation', '5.1', 'The "%s()" method is deprecated, use "new %s()" instead.', __METHOD__, \get_called_class()); + trigger_deprecation('symfony/http-foundation', '5.1', 'The "%s()" method is deprecated, use "new %s()" instead.', __METHOD__, static::class); return new static($data, $status, $headers); } diff --git a/src/Symfony/Component/HttpFoundation/RedirectResponse.php b/src/Symfony/Component/HttpFoundation/RedirectResponse.php index c00548348f..5fc5322a06 100644 --- a/src/Symfony/Component/HttpFoundation/RedirectResponse.php +++ b/src/Symfony/Component/HttpFoundation/RedirectResponse.php @@ -58,7 +58,7 @@ class RedirectResponse extends Response */ public static function create($url = '', int $status = 302, array $headers = []) { - trigger_deprecation('symfony/http-foundation', '5.1', 'The "%s()" method is deprecated, use "new %s()" instead.', __METHOD__, \get_called_class()); + trigger_deprecation('symfony/http-foundation', '5.1', 'The "%s()" method is deprecated, use "new %s()" instead.', __METHOD__, static::class); return new static($url, $status, $headers); } diff --git a/src/Symfony/Component/HttpFoundation/Response.php b/src/Symfony/Component/HttpFoundation/Response.php index 981b93532f..07f6814179 100644 --- a/src/Symfony/Component/HttpFoundation/Response.php +++ b/src/Symfony/Component/HttpFoundation/Response.php @@ -234,7 +234,7 @@ class Response */ public static function create(?string $content = '', int $status = 200, array $headers = []) { - trigger_deprecation('symfony/http-foundation', '5.1', 'The "%s()" method is deprecated, use "new %s()" instead.', __METHOD__, \get_called_class()); + trigger_deprecation('symfony/http-foundation', '5.1', 'The "%s()" method is deprecated, use "new %s()" instead.', __METHOD__, static::class); return new static($content, $status, $headers); } diff --git a/src/Symfony/Component/HttpFoundation/StreamedResponse.php b/src/Symfony/Component/HttpFoundation/StreamedResponse.php index 7cbf453188..676cd66875 100644 --- a/src/Symfony/Component/HttpFoundation/StreamedResponse.php +++ b/src/Symfony/Component/HttpFoundation/StreamedResponse.php @@ -52,7 +52,7 @@ class StreamedResponse extends Response */ public static function create($callback = null, int $status = 200, array $headers = []) { - trigger_deprecation('symfony/http-foundation', '5.1', 'The "%s()" method is deprecated, use "new %s()" instead.', __METHOD__, \get_called_class()); + trigger_deprecation('symfony/http-foundation', '5.1', 'The "%s()" method is deprecated, use "new %s()" instead.', __METHOD__, static::class); return new static($callback, $status, $headers); } diff --git a/src/Symfony/Component/Ldap/Tests/LdapTestCase.php b/src/Symfony/Component/Ldap/Tests/LdapTestCase.php index 606065e491..dad9f03d0c 100644 --- a/src/Symfony/Component/Ldap/Tests/LdapTestCase.php +++ b/src/Symfony/Component/Ldap/Tests/LdapTestCase.php @@ -9,7 +9,7 @@ class LdapTestCase extends TestCase protected function getLdapConfig() { $h = @ldap_connect(getenv('LDAP_HOST'), getenv('LDAP_PORT')); - @ldap_set_option($h, LDAP_OPT_PROTOCOL_VERSION, 3); + @ldap_set_option($h, \LDAP_OPT_PROTOCOL_VERSION, 3); if (!$h || !@ldap_bind($h)) { $this->markTestSkipped('No server is listening on LDAP_HOST:LDAP_PORT'); diff --git a/src/Symfony/Component/Mailer/Bridge/Amazon/Transport/SesTransportFactory.php b/src/Symfony/Component/Mailer/Bridge/Amazon/Transport/SesTransportFactory.php index 9d6863f12e..758dc3bd35 100644 --- a/src/Symfony/Component/Mailer/Bridge/Amazon/Transport/SesTransportFactory.php +++ b/src/Symfony/Component/Mailer/Bridge/Amazon/Transport/SesTransportFactory.php @@ -40,7 +40,7 @@ final class SesTransportFactory extends AbstractTransportFactory throw new \LogicException(sprintf('You cannot use "%s" as the HttpClient component or AsyncAws package is not installed. Try running "composer require async-aws/ses".', __CLASS__)); } - trigger_deprecation('symfony/amazon-mailer', '5.1', 'Using the "%s" transport without AsyncAws is deprecated. Try running "composer require async-aws/ses".', $scheme, \get_called_class()); + trigger_deprecation('symfony/amazon-mailer', '5.1', 'Using the "%s" transport without AsyncAws is deprecated. Try running "composer require async-aws/ses".', $scheme, static::class); $user = $this->getUser($dsn); $password = $this->getPassword($dsn); diff --git a/src/Symfony/Component/Mailer/Tests/TransportTest.php b/src/Symfony/Component/Mailer/Tests/TransportTest.php index dfd8d1926e..0327a3902f 100644 --- a/src/Symfony/Component/Mailer/Tests/TransportTest.php +++ b/src/Symfony/Component/Mailer/Tests/TransportTest.php @@ -116,7 +116,7 @@ class DummyTransport implements Transport\TransportInterface public function __toString(): string { - return sprintf('dummy://local'); + return 'dummy://local'; } } diff --git a/src/Symfony/Component/Messenger/Bridge/Amqp/Tests/Fixtures/long_receiver.php b/src/Symfony/Component/Messenger/Bridge/Amqp/Tests/Fixtures/long_receiver.php index 0c7740666c..441d45f503 100644 --- a/src/Symfony/Component/Messenger/Bridge/Amqp/Tests/Fixtures/long_receiver.php +++ b/src/Symfony/Component/Messenger/Bridge/Amqp/Tests/Fixtures/long_receiver.php @@ -13,12 +13,12 @@ if (!file_exists($autoload)) { require_once $autoload; use Symfony\Component\EventDispatcher\EventDispatcher; +use Symfony\Component\Messenger\Bridge\Amqp\Transport\AmqpReceiver; +use Symfony\Component\Messenger\Bridge\Amqp\Transport\Connection; use Symfony\Component\Messenger\Envelope; use Symfony\Component\Messenger\EventListener\DispatchPcntlSignalListener; use Symfony\Component\Messenger\EventListener\StopWorkerOnSigtermSignalListener; use Symfony\Component\Messenger\MessageBusInterface; -use Symfony\Component\Messenger\Bridge\Amqp\Transport\AmqpReceiver; -use Symfony\Component\Messenger\Bridge\Amqp\Transport\Connection; use Symfony\Component\Messenger\Transport\Serialization\Serializer; use Symfony\Component\Messenger\Worker; use Symfony\Component\Serializer as SerializerComponent; @@ -40,7 +40,7 @@ $worker = new Worker(['the_receiver' => $receiver], new class() implements Messa public function dispatch($envelope, array $stamps = []): Envelope { echo 'Get envelope with message: '.get_class($envelope->getMessage())."\n"; - echo sprintf("with stamps: %s\n", json_encode(array_keys($envelope->all()), JSON_PRETTY_PRINT)); + echo sprintf("with stamps: %s\n", json_encode(array_keys($envelope->all()), \JSON_PRETTY_PRINT)); sleep(30); echo "Done.\n"; diff --git a/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/ConnectionTest.php b/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/ConnectionTest.php index 0e0639276c..ff616ec293 100644 --- a/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/ConnectionTest.php +++ b/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/ConnectionTest.php @@ -194,7 +194,7 @@ class ConnectionTest extends TestCase 'expectedAutoSetup' => true, ]; - yield 'test options array' => [ + yield 'test options array' => [ 'dsn' => 'doctrine://default', 'options' => [ 'table_name' => 'name_from_options', diff --git a/src/Symfony/Component/Messenger/RoutableMessageBus.php b/src/Symfony/Component/Messenger/RoutableMessageBus.php index a4a663589f..8b7bedf731 100644 --- a/src/Symfony/Component/Messenger/RoutableMessageBus.php +++ b/src/Symfony/Component/Messenger/RoutableMessageBus.php @@ -45,7 +45,7 @@ class RoutableMessageBus implements MessageBusInterface if (null === $busNameStamp) { if (null === $this->fallbackBus) { - throw new InvalidArgumentException(sprintf('Envelope is missing a BusNameStamp and no fallback message bus is configured on RoutableMessageBus.')); + throw new InvalidArgumentException('Envelope is missing a BusNameStamp and no fallback message bus is configured on RoutableMessageBus.'); } return $this->fallbackBus->dispatch($envelope, $stamps); diff --git a/src/Symfony/Component/Mime/Test/Constraint/EmailAddressContains.php b/src/Symfony/Component/Mime/Test/Constraint/EmailAddressContains.php index c751c3d45f..827e141472 100644 --- a/src/Symfony/Component/Mime/Test/Constraint/EmailAddressContains.php +++ b/src/Symfony/Component/Mime/Test/Constraint/EmailAddressContains.php @@ -59,7 +59,7 @@ final class EmailAddressContains extends Constraint return false; } - throw new \LogicException(sprintf('Unable to test a message address on a non-address header.')); + throw new \LogicException('Unable to test a message address on a non-address header.'); } /** diff --git a/src/Symfony/Component/Security/Http/Authenticator/AbstractAuthenticator.php b/src/Symfony/Component/Security/Http/Authenticator/AbstractAuthenticator.php index 6a5ec2f150..d479e6a070 100644 --- a/src/Symfony/Component/Security/Http/Authenticator/AbstractAuthenticator.php +++ b/src/Symfony/Component/Security/Http/Authenticator/AbstractAuthenticator.php @@ -35,7 +35,7 @@ abstract class AbstractAuthenticator implements AuthenticatorInterface public function createAuthenticatedToken(PassportInterface $passport, string $firewallName): TokenInterface { if (!$passport instanceof UserPassportInterface) { - throw new LogicException(sprintf('Passport does not contain a user, overwrite "createAuthenticatedToken()" in "%s" to create a custom authenticated token.', \get_class($this))); + throw new LogicException(sprintf('Passport does not contain a user, overwrite "createAuthenticatedToken()" in "%s" to create a custom authenticated token.', static::class)); } return new PostAuthenticationToken($passport->getUser(), $firewallName, $passport->getUser()->getRoles()); diff --git a/src/Symfony/Component/Serializer/Tests/Fixtures/AbstractNormalizerDummy.php b/src/Symfony/Component/Serializer/Tests/Fixtures/AbstractNormalizerDummy.php index 7b53f3bf08..ae3b411b31 100644 --- a/src/Symfony/Component/Serializer/Tests/Fixtures/AbstractNormalizerDummy.php +++ b/src/Symfony/Component/Serializer/Tests/Fixtures/AbstractNormalizerDummy.php @@ -23,7 +23,7 @@ class AbstractNormalizerDummy extends AbstractNormalizer /** * {@inheritdoc} */ - public function getAllowedAttributes($classOrObject, array $context, bool $attributesAsString = false) + public function getAllowedAttributes($classOrObject, array $context, bool $attributesAsString = false) { return parent::getAllowedAttributes($classOrObject, $context, $attributesAsString); } diff --git a/src/Symfony/Component/Serializer/Tests/Mapping/Loader/AnnotationLoaderTest.php b/src/Symfony/Component/Serializer/Tests/Mapping/Loader/AnnotationLoaderTest.php index 9c5a9943e3..2470d94acb 100644 --- a/src/Symfony/Component/Serializer/Tests/Mapping/Loader/AnnotationLoaderTest.php +++ b/src/Symfony/Component/Serializer/Tests/Mapping/Loader/AnnotationLoaderTest.php @@ -20,8 +20,8 @@ use Symfony\Component\Serializer\Mapping\Loader\AnnotationLoader; use Symfony\Component\Serializer\Tests\Fixtures\AbstractDummy; use Symfony\Component\Serializer\Tests\Fixtures\AbstractDummyFirstChild; use Symfony\Component\Serializer\Tests\Fixtures\AbstractDummySecondChild; -use Symfony\Component\Serializer\Tests\Fixtures\IgnoreDummy; use Symfony\Component\Serializer\Tests\Fixtures\AbstractDummyThirdChild; +use Symfony\Component\Serializer\Tests\Fixtures\IgnoreDummy; use Symfony\Component\Serializer\Tests\Mapping\TestClassMetadataFactory; /**