Skip to content

Commit a475fff

Browse files
Merge branch '5.4' into 6.0
* 5.4: Run php-cs-fixer
2 parents 2aebc94 + 017111f commit a475fff

File tree

10 files changed

+13
-14
lines changed

10 files changed

+13
-14
lines changed

src/Symfony/Bridge/Twig/Command/LintCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ private function displayJson(OutputInterface $output, array $filesInfo)
234234
return min($errors, 1);
235235
}
236236

237-
private function renderException(SymfonyStyle $output, string $template, Error $exception, string $file = null, ?GithubActionReporter $githubReporter = null)
237+
private function renderException(SymfonyStyle $output, string $template, Error $exception, string $file = null, GithubActionReporter $githubReporter = null)
238238
{
239239
$line = $exception->getTemplateLine();
240240

src/Symfony/Bundle/WebProfilerBundle/Tests/EventListener/WebDebugToolbarListenerTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
use Symfony\Bundle\WebProfilerBundle\EventListener\WebDebugToolbarListener;
1717
use Symfony\Component\HttpFoundation\Request;
1818
use Symfony\Component\HttpFoundation\Response;
19-
use Symfony\Component\HttpFoundation\Session\Session;
2019
use Symfony\Component\HttpKernel\DataCollector\DumpDataCollector;
2120
use Symfony\Component\HttpKernel\Event\ResponseEvent;
2221
use Symfony\Component\HttpKernel\HttpKernelInterface;

src/Symfony/Bundle/WebProfilerBundle/Tests/Resources/MinifyTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,16 @@
1515

1616
/**
1717
* Make sure we can minify content in toolbar.
18+
*
1819
* @author Tobias Nyholm <tobias.nyholm@gmail.com>
1920
*/
2021
class MinifyTest extends TestCase
2122
{
2223
public function testNoSingleLineComments()
2324
{
24-
$dir = dirname(__DIR__, 2).'/Resources/views/Profiler';
25+
$dir = \dirname(__DIR__, 2).'/Resources/views/Profiler';
2526
$message = 'There cannot be any single line comment in this file. Consider using multiple line comment. ';
26-
$this->assertTrue(2 === substr_count(file_get_contents($dir . '/base_js.html.twig'), '//'), $message);
27+
$this->assertTrue(2 === substr_count(file_get_contents($dir.'/base_js.html.twig'), '//'), $message);
2728
$this->assertTrue(0 === substr_count(file_get_contents($dir.'/toolbar.css.twig'), '//'), $message);
2829
}
2930
}

src/Symfony/Component/Console/Output/TrimmedBufferOutput.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ class TrimmedBufferOutput extends Output
2424
private $maxLength;
2525
private $buffer = '';
2626

27-
public function __construct(int $maxLength, ?int $verbosity = self::VERBOSITY_NORMAL, bool $decorated = false, OutputFormatterInterface $formatter = null) {
27+
public function __construct(int $maxLength, ?int $verbosity = self::VERBOSITY_NORMAL, bool $decorated = false, OutputFormatterInterface $formatter = null)
28+
{
2829
if ($maxLength <= 0) {
2930
throw new InvalidArgumentException(sprintf('"%s()" expects a strictly positive maxLength. Got %d.', __METHOD__, $maxLength));
3031
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ public function testItDelaysTheMessage()
462462
$delayExchange = $this->createMock(\AMQPExchange::class);
463463
$delayExchange->expects($this->once())
464464
->method('publish')
465-
->with('{}', 'delay_messages__5000_delay', AMQP_NOPARAM, [
465+
->with('{}', 'delay_messages__5000_delay', \AMQP_NOPARAM, [
466466
'headers' => ['x-some-headers' => 'foo'],
467467
'delivery_mode' => 2,
468468
'timestamp' => time(),
@@ -477,7 +477,7 @@ public function testItRetriesTheMessage()
477477
$delayExchange = $this->createMock(\AMQPExchange::class);
478478
$delayExchange->expects($this->once())
479479
->method('publish')
480-
->with('{}', 'delay_messages__5000_retry', AMQP_NOPARAM);
480+
->with('{}', 'delay_messages__5000_retry', \AMQP_NOPARAM);
481481
$connection = $this->createDelayOrRetryConnection($delayExchange, '', 'delay_messages__5000_retry');
482482

483483
$amqpEnvelope = $this->createMock(\AMQPEnvelope::class);

src/Symfony/Component/Messenger/Bridge/Amqp/Transport/AmqpStamp.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ public static function createFromAmqpEnvelope(\AMQPEnvelope $amqpEnvelope, self
6464
$attr['reply_to'] = $attr['reply_to'] ?? $amqpEnvelope->getReplyTo();
6565

6666
if (null === $retryRoutingKey) {
67-
$stamp = new self($previousStamp->routingKey ?? $amqpEnvelope->getRoutingKey(), $previousStamp->flags ?? AMQP_NOPARAM, $attr);
67+
$stamp = new self($previousStamp->routingKey ?? $amqpEnvelope->getRoutingKey(), $previousStamp->flags ?? \AMQP_NOPARAM, $attr);
6868
} else {
69-
$stamp = new self($retryRoutingKey, $previousStamp->flags ?? AMQP_NOPARAM, $attr);
69+
$stamp = new self($retryRoutingKey, $previousStamp->flags ?? \AMQP_NOPARAM, $attr);
7070
$stamp->isRetryAttempt = true;
7171
}
7272

src/Symfony/Component/Messenger/Exception/StopWorkerException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*/
1717
class StopWorkerException extends RuntimeException implements StopWorkerExceptionInterface
1818
{
19-
public function __construct(string $message = 'Worker should stop.', ?\Throwable $previous = null)
19+
public function __construct(string $message = 'Worker should stop.', \Throwable $previous = null)
2020
{
2121
parent::__construct($message, 0, $previous);
2222
}

src/Symfony/Component/Routing/Loader/AnnotationDirectoryLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ function (\SplFileInfo $current) {
4949
});
5050

5151
foreach ($files as $file) {
52-
if (!$file->isFile() || !str_ends_with($file->getFilename(), '.php')) {
52+
if (!$file->isFile() || !str_ends_with($file->getFilename(), '.php')) {
5353
continue;
5454
}
5555

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -805,7 +805,7 @@ public function count(): int
805805
return \count($this->list);
806806
}
807807

808-
public function getIterator():\Traversable
808+
public function getIterator(): \Traversable
809809
{
810810
return new \ArrayIterator($this->list);
811811
}

src/Symfony/Component/VarExporter/Instantiator.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@ final class Instantiator
5353
* @param array $privateProperties The private properties to set on the instance,
5454
* keyed by their declaring class
5555
*
56-
* @return object
57-
*
5856
* @throws ExceptionInterface When the instance cannot be created
5957
*/
6058
public static function instantiate(string $class, array $properties = [], array $privateProperties = []): object

0 commit comments

Comments
 (0)