Skip to content

Commit 6177b04

Browse files
author
Mathieu Lemoine
committed
apply new cs-fixer and phpstan rules
1 parent b1e8117 commit 6177b04

File tree

6 files changed

+18
-37
lines changed

6 files changed

+18
-37
lines changed

Consumption/Extension/DoctrinePingConnectionExtension.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ class DoctrinePingConnectionExtension implements MessageReceivedExtensionInterfa
1414
*/
1515
protected $registry;
1616

17-
/**
18-
* @param ManagerRegistry $registry
19-
*/
2017
public function __construct(ManagerRegistry $registry)
2118
{
2219
$this->registry = $registry;

Profiler/AbstractMessageQueueCollector.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,6 @@ public function addProducer(string $name, ProducerInterface $producer): void
2222
$this->producers[$name] = $producer;
2323
}
2424

25-
protected function collectInternal(Request $request, Response $response): void
26-
{
27-
$this->data = [];
28-
29-
foreach ($this->producers as $name => $producer) {
30-
if ($producer instanceof TraceableProducer) {
31-
$this->data[$name] = $producer->getTraces();
32-
}
33-
}
34-
}
35-
3625
public function getCount(): int
3726
{
3827
$count = 0;
@@ -94,4 +83,15 @@ public function reset()
9483
{
9584
$this->data = [];
9685
}
86+
87+
protected function collectInternal(Request $request, Response $response): void
88+
{
89+
$this->data = [];
90+
91+
foreach ($this->producers as $name => $producer) {
92+
if ($producer instanceof TraceableProducer) {
93+
$this->data[$name] = $producer->getTraces();
94+
}
95+
}
96+
}
9797
}

Tests/Functional/App/AbstractAsyncListener.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,6 @@ abstract class AbstractAsyncListener extends \Enqueue\AsyncEventDispatcher\Async
2121
*/
2222
protected $registry;
2323

24-
/**
25-
* @param ProducerInterface $producer
26-
* @param Registry $registry
27-
*/
2824
public function __construct(ProducerInterface $producer, Registry $registry)
2925
{
3026
$this->producer = $producer;

Tests/Functional/App/AsyncListener.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,11 @@
88

99
if (class_exists(Event::class) && !class_exists(LegacyEventDispatcherProxy::class)) {
1010
/**
11-
* Symfony < 4.3
11+
* Symfony < 4.3.
1212
*/
1313
class AsyncListener extends AbstractAsyncListener
1414
{
1515
/**
16-
* @param Event $event
1716
* @param string $eventName
1817
*/
1918
public function onEvent(Event $event, $eventName)
@@ -23,7 +22,7 @@ public function onEvent(Event $event, $eventName)
2322
}
2423
} elseif (class_exists(Event::class)) {
2524
/**
26-
* Symfony >= 4.3 and < 5.0
25+
* Symfony >= 4.3 and < 5.0.
2726
*/
2827
class AsyncListener extends AbstractAsyncListener
2928
{
@@ -38,13 +37,12 @@ public function onEvent($event, $eventName)
3837
}
3938
} else {
4039
/**
41-
* Symfony >= 5.0
40+
* Symfony >= 5.0.
4241
*/
4342
class AsyncListener extends AbstractAsyncListener
4443
{
4544
/**
46-
* @param ContractEvent $event
47-
* @param string $eventName
45+
* @param string $eventName
4846
*/
4947
public function onEvent(ContractEvent $event, $eventName)
5048
{

Tests/Functional/App/TestAsyncEventTransformer.php

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
if (class_exists(Event::class) && !class_exists(LegacyEventDispatcherProxy::class)) {
1515
/**
16-
* Symfony < 4.3
16+
* Symfony < 4.3.
1717
*/
1818
class TestAsyncEventTransformer implements EventTransformer
1919
{
@@ -22,9 +22,6 @@ class TestAsyncEventTransformer implements EventTransformer
2222
*/
2323
private $context;
2424

25-
/**
26-
* @param Context $context
27-
*/
2825
public function __construct(Context $context)
2926
{
3027
$this->context = $context;
@@ -60,7 +57,7 @@ public function toEvent($eventName, Message $message)
6057
}
6158
} elseif (class_exists(Event::class)) {
6259
/**
63-
* Symfony >= 4.3 and < 5.0
60+
* Symfony >= 4.3 and < 5.0.
6461
*/
6562
class TestAsyncEventTransformer implements EventTransformer
6663
{
@@ -69,9 +66,6 @@ class TestAsyncEventTransformer implements EventTransformer
6966
*/
7067
private $context;
7168

72-
/**
73-
* @param Context $context
74-
*/
7569
public function __construct(Context $context)
7670
{
7771
$this->context = $context;
@@ -107,7 +101,7 @@ public function toEvent($eventName, Message $message)
107101
}
108102
} else {
109103
/**
110-
* Symfony >= 5.0
104+
* Symfony >= 5.0.
111105
*/
112106
class TestAsyncEventTransformer implements EventTransformer
113107
{
@@ -116,9 +110,6 @@ class TestAsyncEventTransformer implements EventTransformer
116110
*/
117111
private $context;
118112

119-
/**
120-
* @param Context $context
121-
*/
122113
public function __construct(Context $context)
123114
{
124115
$this->context = $context;

Tests/Functional/App/TestAsyncSubscriber.php

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

33
namespace Enqueue\Bundle\Tests\Functional\App;
44

5-
use Symfony\Component\EventDispatcher\Event;
65
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
76
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
87

0 commit comments

Comments
 (0)