Skip to content

Commit 3503e3e

Browse files
CS fixes
1 parent c54ca38 commit 3503e3e

10 files changed

+16
-16
lines changed

DataCollector/ConfigDataCollector.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ public function collect(Request $request, Response $response/*, \Throwable $exce
7979
'php_intl_locale' => class_exists(\Locale::class, false) && \Locale::getDefault() ? \Locale::getDefault() : 'n/a',
8080
'php_timezone' => date_default_timezone_get(),
8181
'xdebug_enabled' => \extension_loaded('xdebug'),
82-
'apcu_enabled' => \extension_loaded('apcu') && filter_var(ini_get('apc.enabled'), \FILTER_VALIDATE_BOOLEAN),
83-
'zend_opcache_enabled' => \extension_loaded('Zend OPcache') && filter_var(ini_get('opcache.enable'), \FILTER_VALIDATE_BOOLEAN),
82+
'apcu_enabled' => \extension_loaded('apcu') && filter_var(\ini_get('apc.enabled'), \FILTER_VALIDATE_BOOLEAN),
83+
'zend_opcache_enabled' => \extension_loaded('Zend OPcache') && filter_var(\ini_get('opcache.enable'), \FILTER_VALIDATE_BOOLEAN),
8484
'bundles' => [],
8585
'sapi_name' => \PHP_SAPI,
8686
];

DataCollector/DumpDataCollector.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ class DumpDataCollector extends DataCollector implements DataDumperInterface
5050
public function __construct(Stopwatch $stopwatch = null, $fileLinkFormat = null, string $charset = null, RequestStack $requestStack = null, $dumper = null)
5151
{
5252
$this->stopwatch = $stopwatch;
53-
$this->fileLinkFormat = $fileLinkFormat ?: ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format');
54-
$this->charset = $charset ?: ini_get('php.output_encoding') ?: ini_get('default_charset') ?: 'UTF-8';
53+
$this->fileLinkFormat = $fileLinkFormat ?: \ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format');
54+
$this->charset = $charset ?: \ini_get('php.output_encoding') ?: \ini_get('default_charset') ?: 'UTF-8';
5555
$this->requestStack = $requestStack;
5656
$this->dumper = $dumper;
5757

@@ -237,7 +237,7 @@ public function __destruct()
237237

238238
$h = headers_list();
239239
$i = \count($h);
240-
array_unshift($h, 'Content-Type: '.ini_get('default_mimetype'));
240+
array_unshift($h, 'Content-Type: '.\ini_get('default_mimetype'));
241241
while (0 !== stripos($h[$i], 'Content-Type:')) {
242242
--$i;
243243
}

DataCollector/MemoryDataCollector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function reset()
4545
{
4646
$this->data = [
4747
'memory' => 0,
48-
'memory_limit' => $this->convertToBytes(ini_get('memory_limit')),
48+
'memory_limit' => $this->convertToBytes(\ini_get('memory_limit')),
4949
];
5050
}
5151

Debug/FileLinkFormatter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class FileLinkFormatter
3434
*/
3535
public function __construct(string $fileLinkFormat = null, RequestStack $requestStack = null, string $baseDir = null, $urlFormat = null)
3636
{
37-
$fileLinkFormat = $fileLinkFormat ?: ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format');
37+
$fileLinkFormat = $fileLinkFormat ?: \ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format');
3838
if ($fileLinkFormat && !\is_array($fileLinkFormat)) {
3939
$i = strpos($f = $fileLinkFormat, '&', max(strrpos($f, '%f'), strrpos($f, '%l'))) ?: \strlen($f);
4040
$fileLinkFormat = [substr($f, 0, $i)] + preg_split('/&([^>]++)>/', substr($f, $i), -1, \PREG_SPLIT_DELIM_CAPTURE);

Fragment/AbstractSurrogateFragmentRenderer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ private function containsNonScalars(array $values): bool
9898
foreach ($values as $value) {
9999
if (\is_array($value)) {
100100
return $this->containsNonScalars($value);
101-
} elseif (!is_scalar($value) && null !== $value) {
101+
} elseif (!\is_scalar($value) && null !== $value) {
102102
return true;
103103
}
104104
}

Fragment/RoutableFragmentRenderer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ private function checkNonScalar(array $values)
8080
foreach ($values as $key => $value) {
8181
if (\is_array($value)) {
8282
$this->checkNonScalar($value);
83-
} elseif (!is_scalar($value) && null !== $value) {
83+
} elseif (!\is_scalar($value) && null !== $value) {
8484
throw new \LogicException(sprintf('Controller attributes cannot contain non-scalar/non-null values (value for key "%s" is not a scalar or null).', $key));
8585
}
8686
}

Log/Logger.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ private function format(string $level, string $message, array $context, bool $pr
9191
if (str_contains($message, '{')) {
9292
$replacements = [];
9393
foreach ($context as $key => $val) {
94-
if (null === $val || is_scalar($val) || (\is_object($val) && method_exists($val, '__toString'))) {
94+
if (null === $val || \is_scalar($val) || (\is_object($val) && method_exists($val, '__toString'))) {
9595
$replacements["{{$key}}"] = $val;
9696
} elseif ($val instanceof \DateTimeInterface) {
9797
$replacements["{{$key}}"] = $val->format(\DateTime::RFC3339);

Tests/DataCollector/ConfigDataCollectorTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ public function testCollect()
3939
$this->assertSame(4 === Kernel::MINOR_VERSION, $c->isSymfonyLts());
4040
$this->assertNull($c->getToken());
4141
$this->assertSame(\extension_loaded('xdebug'), $c->hasXDebug());
42-
$this->assertSame(\extension_loaded('Zend OPcache') && filter_var(ini_get('opcache.enable'), \FILTER_VALIDATE_BOOLEAN), $c->hasZendOpcache());
43-
$this->assertSame(\extension_loaded('apcu') && filter_var(ini_get('apc.enabled'), \FILTER_VALIDATE_BOOLEAN), $c->hasApcu());
42+
$this->assertSame(\extension_loaded('Zend OPcache') && filter_var(\ini_get('opcache.enable'), \FILTER_VALIDATE_BOOLEAN), $c->hasZendOpcache());
43+
$this->assertSame(\extension_loaded('apcu') && filter_var(\ini_get('apc.enabled'), \FILTER_VALIDATE_BOOLEAN), $c->hasApcu());
4444
$this->assertSame(sprintf('%s.%s', Kernel::MAJOR_VERSION, Kernel::MINOR_VERSION), $c->getSymfonyMinorVersion());
4545
$this->assertContains($c->getSymfonyState(), ['eol', 'eom', 'dev', 'stable']);
4646

@@ -83,8 +83,8 @@ public function testCollectWithoutKernel()
8383
$this->assertSame(4 === Kernel::MINOR_VERSION, $c->isSymfonyLts());
8484
$this->assertNull($c->getToken());
8585
$this->assertSame(\extension_loaded('xdebug'), $c->hasXDebug());
86-
$this->assertSame(\extension_loaded('Zend OPcache') && filter_var(ini_get('opcache.enable'), \FILTER_VALIDATE_BOOLEAN), $c->hasZendOpcache());
87-
$this->assertSame(\extension_loaded('apcu') && filter_var(ini_get('apc.enabled'), \FILTER_VALIDATE_BOOLEAN), $c->hasApcu());
86+
$this->assertSame(\extension_loaded('Zend OPcache') && filter_var(\ini_get('opcache.enable'), \FILTER_VALIDATE_BOOLEAN), $c->hasZendOpcache());
87+
$this->assertSame(\extension_loaded('apcu') && filter_var(\ini_get('apc.enabled'), \FILTER_VALIDATE_BOOLEAN), $c->hasApcu());
8888
$this->assertSame(sprintf('%s.%s', Kernel::MAJOR_VERSION, Kernel::MINOR_VERSION), $c->getSymfonyMinorVersion());
8989
$this->assertContains($c->getSymfonyState(), ['eol', 'eom', 'dev', 'stable']);
9090

Tests/KernelTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,7 @@ public function testKernelStartTimeIsResetWhileBootingAlreadyBootedKernel()
662662
$kernel->boot();
663663
$preReBoot = $kernel->getStartTime();
664664

665-
sleep(3600); //Intentionally large value to detect if ClockMock ever breaks
665+
sleep(3600); // Intentionally large value to detect if ClockMock ever breaks
666666
$kernel->reboot(null);
667667

668668
$this->assertGreaterThan($preReBoot, $kernel->getStartTime());

Tests/Profiler/FileProfilerStorageTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ public function testDuplicates()
272272
$profile->setUrl('http://example.net/');
273273
$profile->setMethod('GET');
274274

275-
///three duplicates
275+
// three duplicates
276276
$this->storage->write($profile);
277277
$this->storage->write($profile);
278278
$this->storage->write($profile);

0 commit comments

Comments
 (0)