Skip to content

Commit 64e6b78

Browse files
committed
minor symfony#59173 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.2 | 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 Commits ------- 92ef8bc chore: PHP CS Fixer fixes
2 parents 4ababf2 + 92ef8bc commit 64e6b78

File tree

36 files changed

+67
-68
lines changed

36 files changed

+67
-68
lines changed

src/Symfony/Bridge/Doctrine/Tests/Form/DataTransformer/CollectionToArrayTransformerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ public function getIterator(): \Traversable
172172

173173
public function count(): int
174174
{
175-
return count($this->array);
175+
return \count($this->array);
176176
}
177177
};
178178

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@
110110
}
111111

112112
if (version_compare($PHPUNIT_VERSION, '10.0', '>=') && version_compare($PHPUNIT_VERSION, '11.0', '<')) {
113-
fwrite(STDERR, 'This script does not work with PHPUnit 10.'.\PHP_EOL);
113+
fwrite(\STDERR, 'This script does not work with PHPUnit 10.'.\PHP_EOL);
114114
exit(1);
115115
}
116116

src/Symfony/Bundle/FrameworkBundle/Command/AboutCommand.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,9 @@ protected function execute(InputInterface $input, OutputInterface $output): int
8484
['Architecture', (\PHP_INT_SIZE * 8).' bits'],
8585
['Intl locale', class_exists(\Locale::class, false) && \Locale::getDefault() ? \Locale::getDefault() : 'n/a'],
8686
['Timezone', date_default_timezone_get().' (<comment>'.(new \DateTimeImmutable())->format(\DateTimeInterface::W3C).'</>)'],
87-
['OPcache', \extension_loaded('Zend OPcache') ? (filter_var(\ini_get('opcache.enable'), FILTER_VALIDATE_BOOLEAN) ? 'Enabled' : 'Not enabled') : 'Not installed'],
88-
['APCu', \extension_loaded('apcu') ? (filter_var(\ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? 'Enabled' : 'Not enabled') : 'Not installed'],
89-
['Xdebug', \extension_loaded('xdebug') ? ($xdebugMode && 'off' !== $xdebugMode ? 'Enabled (' . $xdebugMode . ')' : 'Not enabled') : 'Not installed'],
87+
['OPcache', \extension_loaded('Zend OPcache') ? (filter_var(\ini_get('opcache.enable'), \FILTER_VALIDATE_BOOLEAN) ? 'Enabled' : 'Not enabled') : 'Not installed'],
88+
['APCu', \extension_loaded('apcu') ? (filter_var(\ini_get('apc.enabled'), \FILTER_VALIDATE_BOOLEAN) ? 'Enabled' : 'Not enabled') : 'Not installed'],
89+
['Xdebug', \extension_loaded('xdebug') ? ($xdebugMode && 'off' !== $xdebugMode ? 'Enabled ('.$xdebugMode.')' : 'Not enabled') : 'Not installed'],
9090
];
9191

9292
$io->table([], $rows);

src/Symfony/Component/Cache/Tests/Traits/RedisProxiesTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function testRedisProxy($class)
3434
$expected = substr($proxy, 0, 2 + strpos($proxy, '}'));
3535
$methods = [];
3636

37-
foreach ((new \ReflectionClass(sprintf('Symfony\Component\Cache\Traits\\%s%dProxy', $class, $version)))->getMethods() as $method) {
37+
foreach ((new \ReflectionClass(\sprintf('Symfony\Component\Cache\Traits\\%s%dProxy', $class, $version)))->getMethods() as $method) {
3838
if ('reset' === $method->name || method_exists(LazyProxyTrait::class, $method->name)) {
3939
continue;
4040
}

src/Symfony/Component/Config/ConfigCache.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function __construct(
3737
string $file,
3838
private bool $debug,
3939
?string $metaFile = null,
40-
array|null $skippedResourceTypes = null,
40+
?array $skippedResourceTypes = null,
4141
) {
4242
$checkers = [];
4343
if ($this->debug) {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public function ask(InputInterface $input, OutputInterface $output, Question $qu
5555
}
5656

5757
$inputStream = $input instanceof StreamableInputInterface ? $input->getStream() : null;
58-
$inputStream ??= STDIN;
58+
$inputStream ??= \STDIN;
5959

6060
try {
6161
if (!$question->getValidator()) {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ protected function processValue(mixed $value, bool $isRoot = false): mixed
228228

229229
foreach ($names as $key => $name) {
230230
if (\array_key_exists($name, $arguments) && (0 === $key || \array_key_exists($key - 1, $arguments))) {
231-
if (!array_key_exists($key, $arguments)) {
231+
if (!\array_key_exists($key, $arguments)) {
232232
$arguments[$key] = $arguments[$name];
233233
}
234234
unset($arguments[$name]);

src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveAutowireInlineAttributesPassTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
use Symfony\Component\DependencyInjection\Compiler\ResolveChildDefinitionsPass;
1919
use Symfony\Component\DependencyInjection\Compiler\ResolveNamedArgumentsPass;
2020
use Symfony\Component\DependencyInjection\ContainerBuilder;
21-
use Symfony\Component\DependencyInjection\Definition;
2221
use Symfony\Component\DependencyInjection\Reference;
2322

2423
require_once __DIR__.'/../Fixtures/includes/autowiring_classes.php';

src/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1280,7 +1280,7 @@ public function testStaticConstructor()
12801280
public function testStaticConstructorWithFactoryThrows()
12811281
{
12821282
$container = new ContainerBuilder();
1283-
$loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath . '/xml'));
1283+
$loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath.'/xml'));
12841284

12851285
$this->expectException(LogicException::class);
12861286
$this->expectExceptionMessage('The "static_constructor" service cannot declare a factory as well as a constructor.');
@@ -1341,7 +1341,7 @@ public function testUnknownConstantAsKey()
13411341
public function testDeprecatedTagged()
13421342
{
13431343
$container = new ContainerBuilder();
1344-
$loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath . '/xml'));
1344+
$loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath.'/xml'));
13451345

13461346
$this->expectUserDeprecationMessage(\sprintf('Since symfony/dependency-injection 7.2: Type "tagged" is deprecated for tag <argument>, use "tagged_iterator" instead in "%s/xml%sservices_with_deprecated_tagged.xml".', self::$fixturesPath, \DIRECTORY_SEPARATOR));
13471347

src/Symfony/Component/Finder/Tests/Iterator/RecursiveDirectoryIteratorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public function testSeekOnFtp()
7070

7171
public function testTrailingDirectorySeparatorIsStripped()
7272
{
73-
$fixturesDirectory = __DIR__ . '/../Fixtures/';
73+
$fixturesDirectory = __DIR__.'/../Fixtures/';
7474
$actual = [];
7575

7676
foreach (new RecursiveDirectoryIterator($fixturesDirectory, RecursiveDirectoryIterator::SKIP_DOTS) as $file) {

0 commit comments

Comments
 (0)