Fix CS
This commit is contained in:
parent
c9cdac153f
commit
85090fcfb8
@ -60,6 +60,7 @@ class DoctrineOrmTypeGuesser implements FormTypeGuesserInterface
|
||||
|
||||
switch ($metadata->getTypeOfField($property)) {
|
||||
case self::$useDeprecatedConstants ? Type::TARRAY : Types::ARRAY:
|
||||
// no break
|
||||
case self::$useDeprecatedConstants ? Type::SIMPLE_ARRAY : Types::SIMPLE_ARRAY:
|
||||
return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\CollectionType', [], Guess::MEDIUM_CONFIDENCE);
|
||||
case self::$useDeprecatedConstants ? Type::BOOLEAN : Types::BOOLEAN:
|
||||
|
@ -41,8 +41,8 @@ use Symfony\Contracts\HttpClient\HttpClientInterface;
|
||||
*/
|
||||
class ElasticsearchLogstashHandler extends AbstractHandler
|
||||
{
|
||||
use ProcessableHandlerTrait;
|
||||
use FormattableHandlerTrait;
|
||||
use ProcessableHandlerTrait;
|
||||
|
||||
private $endpoint;
|
||||
private $index;
|
||||
|
@ -66,7 +66,7 @@ class LazyLoadingValueHolderGenerator extends BaseGenerator
|
||||
if (null !== $docBlock = $method->getDocBlock()) {
|
||||
$code = substr($code, \strlen($docBlock->generate()));
|
||||
}
|
||||
$refAmp = (strpos($code, '&') ?: \PHP_INT_MAX) <= strpos($code, '(') ? '&' : '';
|
||||
$refAmp = (strpos($code, '&') ?: PHP_INT_MAX) <= strpos($code, '(') ? '&' : '';
|
||||
$body = preg_replace(
|
||||
'/\nreturn (\$this->valueHolder[0-9a-f]++)(->[^;]++);$/',
|
||||
"\nif ($1 === \$returnValue = {$refAmp}$1$2) {\n \$returnValue = \$this;\n}\n\nreturn \$returnValue;",
|
||||
|
@ -22,8 +22,8 @@ use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException;
|
||||
abstract class WebTestCase extends KernelTestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
use WebTestAssertionsTrait;
|
||||
use MailerAssertionsTrait;
|
||||
use WebTestAssertionsTrait;
|
||||
|
||||
private function doTearDown()
|
||||
{
|
||||
|
@ -14,7 +14,6 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Controller;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\TemplateController;
|
||||
use Symfony\Bundle\FrameworkBundle\Templating\EngineInterface;
|
||||
use Symfony\Bundle\FrameworkBundle\Tests\TestCase;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
|
||||
/**
|
||||
* @author Kévin Dunglas <dunglas@gmail.com>
|
||||
|
@ -30,8 +30,8 @@ use Symfony\Contracts\Cache\CacheInterface;
|
||||
*/
|
||||
class PhpArrayAdapter implements AdapterInterface, CacheInterface, PruneableInterface, ResettableInterface
|
||||
{
|
||||
use PhpArrayTrait;
|
||||
use ContractsTrait;
|
||||
use PhpArrayTrait;
|
||||
|
||||
private $createCacheItem;
|
||||
|
||||
|
@ -25,8 +25,8 @@ use Symfony\Contracts\Cache\CacheInterface;
|
||||
*/
|
||||
class ProxyAdapter implements AdapterInterface, CacheInterface, PruneableInterface, ResettableInterface
|
||||
{
|
||||
use ProxyTrait;
|
||||
use ContractsTrait;
|
||||
use ProxyTrait;
|
||||
|
||||
private $namespace;
|
||||
private $namespaceLen;
|
||||
|
@ -27,8 +27,8 @@ class TagAwareAdapter implements TagAwareAdapterInterface, TagAwareCacheInterfac
|
||||
{
|
||||
const TAGS_PREFIX = "\0tags\0";
|
||||
|
||||
use ProxyTrait;
|
||||
use ContractsTrait;
|
||||
use ProxyTrait;
|
||||
|
||||
private $deferred = [];
|
||||
private $createCacheItem;
|
||||
|
@ -427,7 +427,6 @@ trait PdoTrait
|
||||
switch (true) {
|
||||
case $driver instanceof \Doctrine\DBAL\Driver\Mysqli\Driver:
|
||||
throw new \LogicException(sprintf('The adapter "%s" does not support the mysqli driver, use pdo_mysql instead.', static::class));
|
||||
|
||||
case $driver instanceof \Doctrine\DBAL\Driver\AbstractMySQLDriver:
|
||||
$this->driver = 'mysql';
|
||||
break;
|
||||
|
@ -897,8 +897,7 @@ class ApplicationTest extends TestCase
|
||||
$application = new Application();
|
||||
$application->setAutoExit(false);
|
||||
$application->register('foo')->setCode(function () {
|
||||
throw new class('') extends \InvalidArgumentException {
|
||||
};
|
||||
throw new class('') extends \InvalidArgumentException { };
|
||||
});
|
||||
$tester = new ApplicationTester($application);
|
||||
|
||||
@ -908,8 +907,7 @@ class ApplicationTest extends TestCase
|
||||
$application = new Application();
|
||||
$application->setAutoExit(false);
|
||||
$application->register('foo')->setCode(function () {
|
||||
throw new \InvalidArgumentException(sprintf('Dummy type "%s" is invalid.', \get_class(new class() {
|
||||
})));
|
||||
throw new \InvalidArgumentException(sprintf('Dummy type "%s" is invalid.', \get_class(new class() { })));
|
||||
});
|
||||
$tester = new ApplicationTester($application);
|
||||
|
||||
@ -922,8 +920,7 @@ class ApplicationTest extends TestCase
|
||||
$application = new Application();
|
||||
$application->setAutoExit(false);
|
||||
$application->register('foo')->setCode(function () {
|
||||
throw new class('') extends \InvalidArgumentException {
|
||||
};
|
||||
throw new class('') extends \InvalidArgumentException { };
|
||||
});
|
||||
$tester = new ApplicationTester($application);
|
||||
|
||||
@ -933,8 +930,7 @@ class ApplicationTest extends TestCase
|
||||
$application = new Application();
|
||||
$application->setAutoExit(false);
|
||||
$application->register('foo')->setCode(function () {
|
||||
throw new \InvalidArgumentException(sprintf('Dummy type "%s" is invalid.', \get_class(new class() {
|
||||
})));
|
||||
throw new \InvalidArgumentException(sprintf('Dummy type "%s" is invalid.', \get_class(new class() { })));
|
||||
});
|
||||
$tester = new ApplicationTester($application);
|
||||
|
||||
|
@ -21,6 +21,7 @@ class InstanceofConfigurator extends AbstractServiceConfigurator
|
||||
const FACTORY = 'instanceof';
|
||||
|
||||
use Traits\AutowireTrait;
|
||||
use Traits\BindTrait;
|
||||
use Traits\CallTrait;
|
||||
use Traits\ConfiguratorTrait;
|
||||
use Traits\LazyTrait;
|
||||
@ -28,7 +29,6 @@ class InstanceofConfigurator extends AbstractServiceConfigurator
|
||||
use Traits\PublicTrait;
|
||||
use Traits\ShareTrait;
|
||||
use Traits\TagTrait;
|
||||
use Traits\BindTrait;
|
||||
|
||||
private $path;
|
||||
|
||||
|
@ -54,7 +54,7 @@ class Gitignore
|
||||
}
|
||||
|
||||
$negativesAfter = array_filter(\array_slice($negatives, ++$index));
|
||||
if ($negativesAfter !== []) {
|
||||
if ([] !== $negativesAfter) {
|
||||
$pattern .= sprintf('(?<!%s)', implode('|', $negativesAfter));
|
||||
}
|
||||
|
||||
|
@ -70,18 +70,18 @@ The <info>%command.name%</info> command displays information about form types.
|
||||
|
||||
<info>php %command.full_name%</info>
|
||||
|
||||
The command lists all built-in types, services types, type extensions and
|
||||
The command lists all built-in types, services types, type extensions and
|
||||
guessers currently available.
|
||||
|
||||
<info>php %command.full_name% Symfony\Component\Form\Extension\Core\Type\ChoiceType</info>
|
||||
<info>php %command.full_name% ChoiceType</info>
|
||||
|
||||
The command lists all defined options that contains the given form type,
|
||||
The command lists all defined options that contains the given form type,
|
||||
as well as their parents and type extensions.
|
||||
|
||||
<info>php %command.full_name% ChoiceType choice_value</info>
|
||||
|
||||
Use the <info>--show-deprecated</info> option to display form types with
|
||||
Use the <info>--show-deprecated</info> option to display form types with
|
||||
deprecated options or the deprecated options of the given form type:
|
||||
|
||||
<info>php %command.full_name% --show-deprecated</info>
|
||||
|
@ -1589,7 +1589,7 @@ class Request
|
||||
/**
|
||||
* Gets the preferred format for the response by inspecting, in the following order:
|
||||
* * the request format set using setRequestFormat
|
||||
* * the values of the Accept HTTP header
|
||||
* * the values of the Accept HTTP header.
|
||||
*
|
||||
* Note that if you use this method, you should send the "Vary: Accept" header
|
||||
* in the response to prevent any issues with intermediary HTTP caches.
|
||||
|
@ -14,7 +14,6 @@ namespace Symfony\Component\HttpKernel\Tests\Controller;
|
||||
use Psr\Container\ContainerInterface;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Symfony\Component\DependencyInjection\Container;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpKernel\Controller\ContainerControllerResolver;
|
||||
|
||||
|
@ -334,7 +334,6 @@ class PdoStore implements StoreInterface
|
||||
switch (true) {
|
||||
case $driver instanceof \Doctrine\DBAL\Driver\Mysqli\Driver:
|
||||
throw new \LogicException(sprintf('The adapter "%s" does not support the mysqli driver, use pdo_mysql instead.', static::class));
|
||||
|
||||
case $driver instanceof \Doctrine\DBAL\Driver\AbstractMySQLDriver:
|
||||
$this->driver = 'mysql';
|
||||
break;
|
||||
|
@ -59,7 +59,7 @@ class DataPart extends TextPart
|
||||
if (false === is_readable($path)) {
|
||||
throw new InvalidArgumentException(sprintf('Path "%s" is not readable.', $path));
|
||||
}
|
||||
|
||||
|
||||
if (false === $handle = @fopen($path, 'r', false)) {
|
||||
throw new InvalidArgumentException(sprintf('Unable to open path "%s".', $path));
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ class PoFileDumper extends FileDumper
|
||||
|
||||
$sourceRules = $this->getStandardRules($source);
|
||||
$targetRules = $this->getStandardRules($target);
|
||||
if (2 == \count($sourceRules) && $targetRules !== []) {
|
||||
if (2 == \count($sourceRules) && [] !== $targetRules) {
|
||||
$output .= sprintf('msgid "%s"'."\n", $this->escape($sourceRules[0]));
|
||||
$output .= sprintf('msgid_plural "%s"'."\n", $this->escape($sourceRules[1]));
|
||||
foreach ($targetRules as $i => $targetRule) {
|
||||
|
Reference in New Issue
Block a user