Skip to content

Commit 4e081ab

Browse files
committed
Update minor comments
1 parent 702ed7a commit 4e081ab

File tree

10 files changed

+11
-18
lines changed

10 files changed

+11
-18
lines changed

src/Symfony/Bundle/FrameworkBundle/Controller/ControllerTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ protected function isCsrfTokenValid(string $id, string $token): bool
391391
*
392392
* @return mixed The result from the bus
393393
*
394-
* @final since version 4.1
394+
* @final
395395
*/
396396
protected function dispatch($message)
397397
{

src/Symfony/Bundle/FrameworkBundle/DataCollector/MessagesDataCollector.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ public function handle($message, callable $next)
5656
),
5757
);
5858

59+
$exception = null;
5960
try {
6061
$result = $next($message);
6162

@@ -78,7 +79,7 @@ public function handle($message, callable $next)
7879

7980
$this->data[] = $debugRepresentation;
8081

81-
if (isset($exception)) {
82+
if (null !== $exception) {
8283
throw $exception;
8384
}
8485

src/Symfony/Component/Message/Debug/LoggingMiddleware.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@
1919
*/
2020
class LoggingMiddleware implements MiddlewareInterface
2121
{
22-
/**
23-
* @var LoggerInterface
24-
*/
2522
private $logger;
2623

2724
public function __construct(LoggerInterface $logger)

src/Symfony/Component/Message/DependencyInjection/MessagePass.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ private function registerHandlers(ContainerBuilder $container)
9595

9696
private function guessHandledClass(ContainerBuilder $container, string $serviceId): string
9797
{
98-
$reflection = new \ReflectionClass($container->getDefinition($serviceId)->getClass());
98+
$reflection = $container->getReflectionClass($container->getDefinition($serviceId)->getClass());
99+
99100
try {
100101
$method = $reflection->getMethod('__invoke');
101102
} catch (\ReflectionException $e) {

src/Symfony/Component/Message/MessageBusInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
interface MessageBusInterface
1818
{
1919
/**
20-
* Dispatch the given message.
20+
* Dispatches the given message.
2121
*
2222
* The bus can return a value coming from handlers, but is not required to do so.
2323
*

src/Symfony/Component/Message/Transport/SenderInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
interface SenderInterface
1818
{
1919
/**
20-
* Send the given message.
20+
* Sends the given message.
2121
*
2222
* @param object $message
2323
*/

src/Symfony/Component/Message/Transport/Serialization/DecoderInterface.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ interface DecoderInterface
2626
* - `body` (string) - the message body
2727
* - `headers` (string<string>) - a key/value pair of headers
2828
*
29-
* @param array $encodedMessage
30-
*
3129
* @return object
3230
*/
3331
public function decode(array $encodedMessage);

src/Symfony/Component/Message/Transport/Serialization/EncoderInterface.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ interface EncoderInterface
2525
* - `headers` (string<string>) - a key/value pair of headers
2626
*
2727
* @param object $message The object that is put on the MessageBus by the user
28-
*
29-
* @return array
3028
*/
3129
public function encode($message): array;
3230
}

src/Symfony/Component/Message/Transport/Serialization/Serializer.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function __construct(SerializerInterface $serializer, string $format = 'j
3333
public function decode(array $encodedMessage)
3434
{
3535
if (empty($encodedMessage['body']) || empty($encodedMessage['headers'])) {
36-
throw new \InvalidArgumentException('Encoded message should have at least a `body` some `headers`.');
36+
throw new \InvalidArgumentException('Encoded message should have at least a `body` and some `headers`.');
3737
} elseif (empty($encodedMessage['headers']['type'])) {
3838
throw new \InvalidArgumentException('Encoded message does not have a `type` header.');
3939
}
@@ -48,9 +48,7 @@ public function encode($message): array
4848
{
4949
return array(
5050
'body' => $this->serializer->serialize($message, $this->format),
51-
'headers' => array(
52-
'type' => get_class($message),
53-
),
51+
'headers' => array('type' => get_class($message)),
5452
);
5553
}
5654
}

src/Symfony/Component/Message/composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
"license": "MIT",
88
"authors": [
99
{
10-
"name": "Fabien Potencier",
11-
"email": "fabien@symfony.com"
10+
"name": "Samuel Roze",
11+
"email": "samuel.roze@gmail.com"
1212
},
1313
{
1414
"name": "Symfony Community",

0 commit comments

Comments
 (0)