8000 chore: PHP CS Fixer fixes · symfony/symfony@92ef8bc · GitHub
[go: up one dir, main page]

Skip to content

Commit 92ef8bc

Browse files
keradusfabpot
authored andcommitted
chore: PHP CS Fixer fixes
1 parent 4ababf2 commit 92ef8bc

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. F438 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) {

src/Symfony/Component/HttpClient/DataCollector/HttpClientDataCollector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ private function escapePayload(string $payload): string
252252
{
253253
static $useProcess;
254254

255-
if ($useProcess ??= function_exists('proc_open') && class_exists(Process::class)) {
255+
if ($useProcess ??= \function_exists('proc_open') && class_exists(Process::class)) {
256256
return substr((new Process(['', $payload]))->getCommandLine(), 3);
257257
}
258258

src/Symfony/Component/HttpClient/HttpClientTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,7 @@ private static function parseUrl(string $url, array $query = [], array $allowedS
650650
$tail = '';
651651

652652
if (false === $parts = parse_url(\strlen($url) !== strcspn($url, '?#') ? $url : $url.$tail = '#')) {
653-
throw new InvalidArgumentException(sprintf('Malformed URL "%s".', $url));
653+
throw new InvalidArgumentException(\sprintf('Malformed URL "%s".', $url));
654654
}
655655

656656
if ($query) {

src/Symfony/Component/HttpClient/NoPrivateNetworkHttpClient.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@
3030
*/
3131
final class NoPrivateNetworkHttpClient implements HttpClientInterface, LoggerAwareInterface, ResetInterface
3232
{
33-
use HttpClientTrait;
3433
use AsyncDecoratorTrait;
34+
use HttpClientTrait;
3535

3636
private array $defaultOptions = self::OPTIONS_DEFAULTS;
3737
private HttpClientInterface $client;
38-
private array|null $subnets;
38+
private ?array $subnets;
3939
private int $ipFlags;
4040
private \ArrayObject $dnsCache;
4141

@@ -209,7 +209,7 @@ private static function dnsResolve(\ArrayObject $dnsCache, string $host, int $ip
209209

210210
if ($ip = dns_get_record($host, \DNS_AAAA)) {
211211
$ip = $ip[0]['ipv6'];
212-
} elseif (extension_loaded('sockets')) {
212+
} elseif (\extension_loaded('sockets')) {
213213
if (!$info = socket_addrinfo_lookup($host, 0, ['ai_socktype' => \SOCK_STREAM, 'ai_family' => \AF_INET6])) {
214214
return $host;
215215
}

src/Symfony/Component/HttpClient/Tests/HttpClientTestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -691,7 +691,7 @@ public function testPostToGetRedirect(int $status)
691691
try {
692692
$client = $this->getHttpClient(__FUNCTION__);
693693

694-
$response = $client->request('POST', 'http://localhost:8057/custom?status=' . $status . '&headers[]=Location%3A%20%2F');
694+
$response = $client->request('POST', 'http://localhost:8057/custom?status='.$status.'&headers[]=Location%3A%20%2F');
695695
$body = $response->toArray();
696696
} finally {
697697
$p->stop();

src/Symfony/Component/HttpFoundation/ResponseHeaderBag.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ public function getCookies(string $format = self::COOKIES_FLAT): array
221221
*/
222222
public function clearCookie(string $name, ?string $path = '/', ?string $domain = null, bool $secure = false, bool $httpOnly = true, ?string $sameSite = null /* , bool $partitioned = false */): void
223223
{
224-
$partitioned = 6 < \func_num_args() ? \func_get_arg(6) : false;
224+
$partitioned = 6 < \func_num_args() ? func_get_arg(6) : false;
225225

226226
$this->setCookie(new Cookie($name, null, 1, $path, $domain, $secure, $httpOnly, false, $sameSite, $partitioned));
227227
}

src/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,11 @@ public function collect(Request $request, Response $response, ?\Throwable $excep
5757
'php_intl_locale' => class_exists(\Locale::class, false) && \Locale::getDefault() ? \Locale::getDefault() : 'n/a',
5858
'php_timezone' => date_default_timezone_get(),
5959
'xdebug_enabled' => \extension_loaded('xdebug'),
60-
'xdebug_status' => \extension_loaded('xdebug') ? ($xdebugMode && 'off' !== $xdebugMode ? 'Enabled (' . $xdebugMode . ')' : 'Not enabled') : 'Not installed',
60+
'xdebug_status' => \extension_loaded('xdebug') ? ($xdebugMode && 'off' !== $xdebugMode ? 'Enabled ('.$xdebugMode.')' : 'Not enabled') : 'Not installed',
6161
'apcu_enabled' => \extension_loaded('apcu') && filter_var(\ini_get('apc.enabled'), \FILTER_VALIDATE_BOOL),
62-
'apcu_status' => \extension_loaded('apcu') ? (filter_var(\ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? 'Enabled' : 'Not enabled') : 'Not installed',
62+
'apcu_status' => \extension_loaded('apcu') ? (filter_var(\ini_get('apc.enabled'), \FILTER_VALIDATE_BOOLEAN) ? 'Enabled' : 'Not enabled') : 'Not installed',
6363
'zend_opcache_enabled' => \extension_loaded('Zend OPcache') && filter_var(\ini_get('opcache.enable'), \FILTER_VALIDATE_BOOL),
64-
'zend_opcache_status' => \extension_loaded('Zend OPcache') ? (filter_var(\ini_get('opcache.enable'), FILTER_VALIDATE_BOOLEAN) ? 'Enabled' : 'Not enabled') : 'Not installed',
64+
'zend_opcache_status' => \extension_loaded('Zend OPcache') ? (filter_var(\ini_get('opcache.enable'), \FILTER_VALIDATE_BOOLEAN) ? 'Enabled' : 'Not enabled') : 'Not installed',
6565
'bundles' => [],
6666
'sapi_name' => \PHP_SAPI,
6767
];

src/Symfony/Component/HttpKernel/HttpCache/ResponseCacheStrategy.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ private function storeRelativeAgeDirective(string $directive, ?int $value, ?int
222222
}
223223

224224
if (false !== $this->ageDirectives[$directive]) {
225-
48DA $value = min($value ?? PHP_INT_MAX, $expires ?? PHP_INT_MAX);
225+
$value = min($value ?? \PHP_INT_MAX, $expires ?? \PHP_INT_MAX);
226226
$value -= $age;
227227
$this->ageDirectives[$directive] = null !== $this->ageDirectives[$directive] ? min($this->ageDirectives[$directive], $value) : $value;
228228
}

src/Symfony/Component/Ldap/Adapter/ExtLdap/Connection.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function bind(?string $dn = null, #[\SensitiveParameter] ?string $passwor
7171

7272
if (false === @ldap_bind($this->connection, $dn, $password)) {
7373
$error = ldap_error($this->connection);
74-
ldap_get_option($this->connection, LDAP_OPT_DIAGNOSTIC_MESSAGE, $diagnostic);
74+
ldap_get_option($this->connection, \LDAP_OPT_DIAGNOSTIC_MESSAGE, $diagnostic);
7575

7676
throw match (ldap_errno($this->connection)) {
7777
self::LDAP_INVALID_CREDENTIALS => new InvalidCredentialsException($error),
@@ -99,7 +99,7 @@ public function saslBind(?string $dn = null, #[\SensitiveParameter] ?string $pas
9999

100100
if (false === @ldap_sasl_bind($this->connection, $dn, $password, $mech, $realm, $authcId, $authzId, $props)) {
101101
$error = ldap_error($this->connection);
102-
ldap_get_option($this->connection, LDAP_OPT_DIAGNOSTIC_MESSAGE, $diagnostic);
102+
ldap_get_option($this->connection, \LDAP_OPT_DIAGNOSTIC_MESSAGE, $diagnostic);
103103

104104
throw match (ldap_errno($this->connection)) {
105105
self::LDAP_INVALID_CREDENTIALS => new InvalidCredentialsException($error),

src/Symfony/Component/Mailer/Transport/NativeTransportFactory.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function create(Dsn $dsn): TransportInterface
2929
throw new UnsupportedSchemeException($dsn, 'native', $this->getSupportedSchemes());
3030
}
3131

32-
if ($sendMailPath = ini_get('sendmail_path')) {
32+
if ($sendMailPath = \ini_get('sendmail_path')) {
3333
return new SendmailTransport($sendMailPath, $this->dispatcher, $this->logger);
3434
}
3535

@@ -39,8 +39,8 @@ public function create(Dsn $dsn): TransportInterface
3939

4040
// Only for windows hosts; at this point non-windows
4141
// host have already thrown an exception or returned a transport
42-
$host = ini_get('SMTP');
43-
$port = (int) ini_get('smtp_port');
42+
$host = \ini_get('SMTP');
43+
$port = (int) \ini_get('smtp_port');
4444

4545
if (!$host || !$port) {
4646
throw new TransportException('smtp or smtp_port is not configured in php.ini.');

src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/ConnectionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -766,7 +766,7 @@ public function testConfigureSchemaOracleSequenceNameSuffixed()
766766
$sequences = $schema->getSequences();
767767
$this->assertCount(1, $sequences);
768768
$sequence = array_pop($sequences);
769-
$sequenceNameSuffix = substr($sequence->getName(), -strlen($expectedSuffix));
769+
$sequenceNameSuffix = substr($sequence->getName(), -\strlen($expectedSuffix));
770770
$this->assertSame($expectedSuffix, $sequenceNameSuffix);
771771
}
772772
}

src/Symfony/Component/Mime/Part/Multipart/FormDataPart.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
use Symfony\Component\Mime\Exception\InvalidArgumentException;
1515
use Symfony\Component\Mime\Part\AbstractMultipartPart;
16-
use Symfony\Component\Mime\Part\DataPart;
1716
use Symfony\Component\Mime\Part\TextPart;
1817

1918
/**

src/Symfony/Component/Mime/Tests/Encoder/QpContentEncoderTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public function testReplaceLastChar()
2020
{
2121
$encoder = new QpContentEncoder();
2222

23-
$this->assertSame('message=09', $encoder->encodeString('message'.chr(0x09)));
24-
$this->assertSame('message=20', $encoder->encodeString('message'.chr(0x20)));
23+
$this->assertSame('message=09', $encoder->encodeString('message'.\chr(0x09)));
24+
$this->assertSame('message=20', $encoder->encodeString('message'.\chr(0x20)));
2525
}
2626
}

src/Symfony/Component/Mime/Tests/RawMessageTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ public function testToIterableLegacy(mixed $messageParameter, bool $supportReuse
7777

7878
public function testToIterableOnResourceRewindsAndYieldsLines()
7979
{
80-
$handle = \fopen('php://memory', 'r+');
81-
\fwrite($handle, "line1\nline2\nline3\n");
80+
$handle = fopen('php://memory', 'r+');
81+
fwrite($handle, "line1\nline2\nline3\n");
8282

8383
$message = new RawMessage($handle);
8484
$this->assertSame("line1\nline2\nline3\n", implode('', iterator_to_array($message->toIterable())));

src/Symfony/Component/Notifier/Bridge/Lox24/Tests/Lox24TransportTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ public function mockHttpClient(
328328
private function assertHeaders(array $expected, array $headers): void
329329
{
330330
foreach ($this->normalizeHeaders($expected) as $expectedHeader) {
331-
$headerExists = in_array($expectedHeader, $headers, true);
331+
$headerExists = \in_array($expectedHeader, $headers, true);
332332
$this->assertTrue($headerExists, "Header '$expectedHeader' not found in request's headers");
333333
}
334334
}

src/Symfony/Component/Notifier/Bridge/TurboSms/TurboSmsTransport.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ protected function doSend(MessageInterface $message): SentMessage
9090
if (null === $messageId = $success['response_result'][0]['message_id']) {
9191
$responseResult = $success['response_result'][0];
9292

93-
throw new TransportException(sprintf('Unable to send SMS with TurboSMS: Error code %d with message "%s".', (int) $responseResult['response_code'], $responseResult['response_status']), $response);
93+
throw new TransportException(\sprintf('Unable to send SMS with TurboSMS: Error code %d with message "%s".', (int) $responseResult['response_code'], $responseResult['response_status']), $response);
9494
}
9595

9696
$sentMessage = new SentMessage($message, (string) $this);

src/Symfony/Component/Process/ExecutableFinder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public function find(string $name, ?string $default = null, array $extraDirs = [
7272
$pathExt = getenv('PATHEXT');
7373
$suffixes = array_merge($suffixes, $pathExt ? explode(\PATH_SEPARATOR, $pathExt) : ['.exe', '.bat', '.cmd', '.com']);
7474
}
75-
$suffixes = '' !== pathinfo($name, PATHINFO_EXTENSION) ? array_merge([''], $suffixes) : array_merge($suffixes, ['']);
75+
$suffixes = '' !== pathinfo($name, \PATHINFO_EXTENSION) ? array_merge([''], $suffixes) : array_merge($suffixes, ['']);
7676
foreach ($suffixes as $suffix) {
7777
foreach ($dirs as $dir) {
7878
if ('' === $dir) {

src/Symfony/Component/Process/Process.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1596,7 +1596,7 @@ function ($m) use (&$env, $uid) {
15961596

15971597
if (!$comSpec && $comSpec = (new ExecutableFinder())->find('cmd.exe')) {
15981598
// Escape according to CommandLineToArgvW rules
1599-
$comSpec = '"'.preg_replace('{(\\\\*+)"}', '$1$1\"', $comSpec) .'"';
1599+
$comSpec = '"'.preg_replace('{(\\\\*+)"}', '$1$1\"', $comSpec).'"';
16001600
}
16011601

16021602
$cmd = ($comSpec ?? 'cmd').' /V:ON /E:ON /D /C ('.str_replace("\n", ' ', $cmd).')';

src/Symfony/Component/Process/Tests/ExecutableFinderTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ public function testFindBatchExecutableOnWindows()
174174
*/
175175
public function testEmptyDirInPath()
176176
{
177-
putenv(sprintf('PATH=%s%s', \dirname(\PHP_BINARY), \PATH_SEPARATOR));
177+
putenv(\sprintf('PATH=%s%s', \dirname(\PHP_BINARY), \PATH_SEPARATOR));
178178

179179
try {
180180
touch('executable');
@@ -183,7 +183,7 @@ public function testEmptyDirInPath()
183183
$finder = new ExecutableFinder();
184184
$result = $finder->find('executable');
185185

186-
$this->assertSame(sprintf('.%sexecutable', \DIRECTORY_SEPARATOR), $result);
186+
$this->assertSame(\sprintf('.%sexecutable', \DIRECTORY_SEPARATOR), $result);
187187
} finally {
188188
unlink('executable');
189189
}

src/Symfony/Component/PropertyInfo/Util/PhpStanTypeHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ private function extractTypes(TypeNode $node, NameScope $nameScope): array
125125
return [$mainType];
126126
}
127127

128-
$collection = $mainType->isCollection() || \is_a($mainType->getClassName(), \Traversable::class, true) || \is_a($mainType->getClassName(), \ArrayAccess::class, true);
128+
$collection = $mainType->isCollection() || is_a($mainType->getClassName(), \Traversable::class, true) || is_a($mainType->getClassName(), \ArrayAccess::class, true);
129129

130130
// it's safer to fall back to other extractors if the generic type is too abstract
131131
if (!$collection && !class_exists($mainType->getClassName()) && !interface_exists($mainType->getClassName(), false)) {

src/Symfony/Component/RateLimiter/RateLimiterFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ protected static function configureOptions(OptionsResolver $options): void
6161
$now = \DateTimeImmutable::createFromFormat('U', time());
6262

6363
try {
64-
$nowPlusInterval = @$now->modify('+' . $interval);
64+
$nowPlusInterval = @$now->modify('+'.$interval);
6565
} catch (\DateMalformedStringException $e) {
6666
throw new \LogicException(\sprintf('Cannot parse interval "%s", please use a valid unit as described on https://www.php.net/datetime.formats.relative.', $interval), 0, $e);
6767
}

src/Symfony/Component/Routing/Tests/Loader/YamlFileLoaderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ public function testPriorityWithHost()
493493
{
494494
new LoaderResolver([
495495
$loader = new YamlFileLoader(new FileLocator(\dirname(__DIR__).'/Fixtures/locale_and_host')),
496-
new class() extends AttributeClassLoader {
496+
new class extends AttributeClassLoader {
497497
protected function configureRoute(
498498
8AA4 Route $route,
499499
\ReflectionClass $class,

src/Symfony/Component/Serializer/Tests/SerializerTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@
6565
use Symfony\Component\Serializer\Tests\Fixtures\DummyObjectWithEnumProperty;
6666
use Symfony\Component\Serializer\Tests\Fixtures\DummyWithObjectOrNull;
6767
use Symfony\Component\Serializer\Tests\Fixtures\DummyWithVariadicParameter;
68-
use Symfony\Component\Serializer\Tests\Fixtures\DummyWithVariadicProperty;
6968
use Symfony\Component\Serializer\Tests\Fixtures\FalseBuiltInDummy;
7069
use Symfony\Component\Serializer\Tests\Fixtures\FooImplementationDummy;
7170
use Symfony\Component\Serializer\Tests\Fixtures\FooInterfaceDummyDenormalizer;

0 commit comments

Comments
 (0)
0