minor #39714 fix code style (xabbuh)
This PR was merged into the 5.1 branch.
Discussion
----------
fix code style
| Q | A
| ------------- | ---
| Branch? | 5.1
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR |
Commits
-------
08fb696dbc
fix code style
This commit is contained in:
commit
d4620a7d51
@ -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,
|
||||
|
@ -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;
|
||||
|
@ -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]);
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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());
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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;
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user