8000 minor #59972 chore: PHP CS Fixer fixes (keradus) · symfony/symfony@0461860 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0461860

Browse files
minor #59972 chore: PHP CS Fixer fixes (keradus)
This PR was squashed before being merged into the 7.3 branch. Discussion ---------- chore: PHP CS Fixer fixes | Q | A | ------------- | --- | Branch? | 7.3 | Bug fix? | no | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Issues | Fix CS <!-- prefix each issue number with "Fix #", no need to create an issue if none exists, explain below instead --> | License | MIT with love by [PHP Coding Standards Fixer](https://cs.symfony.com/) Commits ------- f63edc5 chore: PHP CS Fixer fixes
2 parents e09e68f + f63edc5 commit 0461860

File tree

20 files changed

+175
-167
lines changed

20 files changed

+175
-167
lines changed

src/Symfony/Bridge/Doctrine/Middleware/Debug/Driver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function connect(array $params): ConnectionInterface
3636
{
3737
$connection = parent::connect($params);
3838

39-
if ('void' !== (string) (new \ReflectionMethod(DriverInterface\Connection::class, 'commit'))->getReturnType()) {
39+
if ('void' !== (string) (new \ReflectionMethod(ConnectionInterface::class, 'commit'))->getReturnType()) {
4040
return new DBAL3\Connection(
4141
$connection,
4242
$this->debugDataHolder,

src/Symfony/Bridge/Doctrine/Tests/DataCollector/DoctrineDataCollectorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ private function createCollector(array $queries): DoctrineDataCollector
246246
->getMock();
247247
$connection->expects($this->any())
248248
->method('getDatabasePlatform')
249-
->willReturn(new MySqlPlatform());
249+
->willReturn(new MySQLPlatform());
250250

251251
$registry = $this->createMock(ManagerRegistry::class);
252252
$registry

src/Symfony/Bridge/PhpUnit/bin/simple-phpunit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ class_exists(\SymfonyExcludeListSimplePhpunit::class, false) && PHPUnit\Util\Bla
462462
}
463463
}
464464
} elseif (!isset($argv[1]) || 'install' !== $argv[1] || file_exists('install')) {
465-
if (!class_exists(\SymfonyExcludeListSimplePhpunit::class, false)) {
465+
if (!class_exists(SymfonyExcludeListSimplePhpunit::class, false)) {
466466
class SymfonyExcludeListSimplePhpunit
467467
{
468468
}

src/Symfony/Bridge/PhpUnit/bootstrap.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
}
2222

2323
// Detect if we're loaded by an actual run of phpunit
24-
if (!defined('PHPUNIT_COMPOSER_INSTALL') && !class_exists(\PHPUnit\TextUI\Command::class, false)) {
24+
if (!defined('PHPUNIT_COMPOSER_INSTALL') && !class_exists(PHPUnit\TextUI\Command::class, false)) {
2525
return;
2626
}
2727

src/Symfony/Component/Cache/Traits/RedisTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -692,7 +692,7 @@ private function pipeline(\Closure $generator, ?object $redis = null): \Generato
692692
$ids = [];
693693
$redis ??= $this->redis;
694694

695-
if ($redis instanceof \RedisCluster || $redis instanceof \Relay\Cluster || ($redis instanceof \Predis\ClientInterface && ($redis->getConnection() instanceof RedisCluster || $redis->getConnection() instanceof Predis2RedisCluster))) {
695+
if ($redis instanceof \RedisCluster || $redis instanceof RelayCluster || ($redis instanceof \Predis\ClientInterface && ($redis->getConnection() instanceof RedisCluster || $redis->getConnection() instanceof Predis2RedisCluster))) {
696696
// phpredis & predis don't support pipelining with RedisCluster
697697
// \Relay\Cluster does not support multi with pipeline mode
698698
// see https://github.com/phpredis/phpredis/blob/develop/cluster.markdown#pipelining

src/Symfony/Component/Cache/Traits/RelayClusterProxy.php

Lines changed: 157 additions & 157 deletions
Large diffs are not rendered by default.

src/Symfony/Component/Clock/Test/ClockSensitiveTrait.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
use Symfony\Component\Clock\Clock;
1818
use Symfony\Component\Clock\ClockInterface;
1919
use Symfony\Component\Clock\MockClock;
20+
2021
use function Symfony\Component\Clock\now;
2122

2223
/**

src/Symfony/Component/Clock/Tests/ClockTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
use Symfony\Component\Clock\MockClock;
1919
use Symfony\Component\Clock\NativeClock;
2020
use Symfony\Component\Clock\Test\ClockSensitiveTrait;
21+
2122
use function Symfony\Component\Clock\now;
2223

2324
class ClockTest extends TestCase

src/Symfony/Component/Console/Formatter/OutputFormatter.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace Symfony\Component\Console\Formatter;
1313

1414
use Symfony\Component\Console\Exception\InvalidArgumentException;
15+
1516
use function Symfony\Component\String\b;
1617

1718
/**

src/Symfony/Component/Console/Helper/QuestionHelper.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
use Symfony\Component\Console\Question\ChoiceQuestion;
2525
use Symfony\Component\Console\Question\Question;
2626
use Symfony\Component\Console\Terminal;
27+
2728
use function Symfony\Component\String\s;
2829

2930
/**

src/Symfony/Component/Console/Tests/Helper/TreeHelperTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public function testRenderWithoutNode()
2525
$tree = TreeHelper::createTree($output);
2626

2727
$tree->render();
28-
$this->assertSame(PHP_EOL, $output->fetch());
28+
$this->assertSame(\PHP_EOL, $output->fetch());
2929
}
3030

3131
public function testRenderSingleNode()

src/Symfony/Component/DependencyInjection/Compiler/CheckCircularReferencesPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ private function checkOutEdges(array $edges): void
6262
continue;
6363
}
6464

65-
$isLeaf = !!$node->getValue();
65+
$isLeaf = (bool) $node->getValue();
6666
$isConcrete = !$edge->isLazy() && !$edge->isWeak();
6767

6868
// Skip already checked lazy services if they are still lazy. Will not gain any new information.

src/Symfony/Component/ErrorHandler/Tests/Command/ErrorDumpCommandTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
use Symfony\Bundle\FrameworkBundle\Console\Application;
1616
use Symfony\Bundle\TwigBundle\Tests\TestCase;
1717
use Symfony\Component\Console\Tester\CommandTester;
18-
use Symfony\Component\DependencyInjection\Container;
1918
use Symfony\Component\ErrorHandler\Command\ErrorDumpCommand;
2019
use Symfony\Component\ErrorHandler\ErrorRenderer\ErrorRendererInterface;
2120
use Symfony\Component\ErrorHandler\Exception\FlattenException;

src/Symfony/Component/HttpClient/Response/AmpResponseV5.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
use Symfony\Component\HttpClient\Internal\Canary;
3131
use Symfony\Component\HttpClient\Internal\ClientState;
3232
use Symfony\Contracts\HttpClient\ResponseInterface;
33+
3334
use function Amp\delay;
3435
use function Amp\Future\awaitFirst;
3536

src/Symfony/Component/Security/Http/AccessToken/OAuth2/Oauth2TokenHandler.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
use Symfony\Component\Security\Http\AccessToken\AccessTokenHandlerInterface;
1919
use Symfony\Component\Security\Http\Authenticator\Passport\Badge\UserBadge;
2020
use Symfony\Contracts\HttpClient\HttpClientInterface;
21+
2122
use function Symfony\Component\String\u;
2223

2324
/**

src/Symfony/Component/Security/Http/AccessToken/Oidc/OidcTrait.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace Symfony\Component\Security\Http\AccessToken\Oidc;
1313

1414
use Symfony\Component\Security\Core\User\OidcUser;
15+
1516
use function Symfony\Component\String\u;
1617

1718
/**

src/Symfony/Component/Security/Http/Tests/Authenticator/Passport/Badge/UserBadgeTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
use Symfony\Component\Security\Http\Authenticator\Passport\Badge\UserBadge;
1818
use Symfony\Component\String\Slugger\AsciiSlugger;
1919
use Symfony\Component\String\UnicodeString;
20+
2021
use function Symfony\Component\String\u;
2122

2223
class UserBadgeTest extends TestCase

src/Symfony/Component/Security/Http/Tests/EventListener/IsGrantedAttributeListenerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ public function testAccessDeniedMessages(string|Expression $attribute, string|ar
224224
$authChecker = new AuthorizationChecker(new TokenStorage(), new AccessDecisionManager((function () use (&$authChecker) {
225225
yield new ExpressionVoter(new ExpressionLanguage(), null, $authChecker);
226226
yield new RoleVoter();
227-
yield new class() extends Voter {
227+
yield new class extends Voter {
228228
protected function supports(string $attribute, mixed $subject): bool
229229
{
230230
return 'POST_VIEW' === $attribute;

src/Symfony/Component/String/Tests/FunctionsTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use Symfony\Component\String\AbstractString;
1616
use Symfony\Component\String\ByteString;
1717
use Symfony\Component\String\UnicodeString;
18+
1819
use function Symfony\Component\String\b;
1920
use function Symfony\Component\String\s;
2021
use function Symfony\Component\String\u;

src/Symfony/Component/VarDumper/Tests/Caster/ReflectionCasterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public function testReflectionCaster()
8686
public function testClosureCaster()
8787
{
8888
$a = $b = 123;
89-
$var = function ($x) use ($a, &$b) {};
89+
$var = function ($x) use ($a, &$b) { var_dump($a, $b); };
9090

9191
$this->assertDumpMatchesFormat(
9292
<<<'EOTXT'

0 commit comments

Comments
 (0)
0