@@ -8,18 +8,18 @@ |
||
8 | 8 | private $command; |
9 | 9 | private $id; |
10 | 10 | |
11 | - public function __construct($command, string $id = null) |
|
11 | + public function __construct ($command, string $id = null) |
|
12 | 12 | { |
13 | 13 | $this->command = $command; |
14 | 14 | $this->id = $id; |
15 | 15 | } |
16 | 16 | |
17 | - public function getCommand() |
|
17 | + public function getCommand () |
|
18 | 18 | { |
19 | 19 | return $this->command; |
20 | 20 | } |
21 | 21 | |
22 | - public function getId() |
|
22 | + public function getId () |
|
23 | 23 | { |
24 | 24 | return $this->id; |
25 | 25 | } |
@@ -8,10 +8,10 @@ |
||
8 | 8 | /** |
9 | 9 | * @return mixed |
10 | 10 | */ |
11 | - public function getCommand(); |
|
11 | + public function getCommand (); |
|
12 | 12 | |
13 | 13 | /** |
14 | 14 | * @return string|null |
15 | 15 | */ |
16 | - public function getId(); |
|
16 | + public function getId (); |
|
17 | 17 | } |
@@ -9,24 +9,24 @@ |
||
9 | 9 | private $dateTime; |
10 | 10 | private $id; |
11 | 11 | |
12 | - public function __construct($command, \DateTime $dateTime, string $id = null) |
|
12 | + public function __construct ($command, \DateTime $dateTime, string $id = null) |
|
13 | 13 | { |
14 | 14 | $this->command = $command; |
15 | 15 | $this->dateTime = $dateTime; |
16 | 16 | $this->id = $id; |
17 | 17 | } |
18 | 18 | |
19 | - public function getCommand() |
|
19 | + public function getCommand () |
|
20 | 20 | { |
21 | 21 | return $this->command; |
22 | 22 | } |
23 | 23 | |
24 | - public function getDateTime(): \DateTime |
|
24 | + public function getDateTime (): \DateTime |
|
25 | 25 | { |
26 | 26 | return $this->dateTime; |
27 | 27 | } |
28 | 28 | |
29 | - public function getId() |
|
29 | + public function getId () |
|
30 | 30 | { |
31 | 31 | return $this->id; |
32 | 32 | } |
@@ -7,7 +7,7 @@ |
||
7 | 7 | class ObjectHashIdGenerator implements CommandIdGeneratorInterface |
8 | 8 | { |
9 | 9 | |
10 | - public function generateId($command): string |
|
10 | + public function generateId ($command): string |
|
11 | 11 | { |
12 | 12 | return spl_object_hash($command); |
13 | 13 | } |
@@ -10,12 +10,12 @@ |
||
10 | 10 | |
11 | 11 | private $serializer; |
12 | 12 | |
13 | - public function __construct(CommandSerializerInterface $serializer) |
|
13 | + public function __construct (CommandSerializerInterface $serializer) |
|
14 | 14 | { |
15 | 15 | $this->serializer = $serializer; |
16 | 16 | } |
17 | 17 | |
18 | - public function generateId($command): string |
|
18 | + public function generateId ($command): string |
|
19 | 19 | { |
20 | 20 | return md5($this->serializer->serialize($command)); |
21 | 21 | } |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | private $serialized; |
11 | 11 | private $dateTime; |
12 | 12 | |
13 | - public function __construct(string $queueName, string $id, string $serialized, \DateTime $dateTime) |
|
13 | + public function __construct (string $queueName, string $id, string $serialized, \DateTime $dateTime) |
|
14 | 14 | { |
15 | 15 | $this->queueName = $queueName; |
16 | 16 | $this->id = $id; |
@@ -18,22 +18,22 @@ discard block |
||
18 | 18 | $this->dateTime = $dateTime; |
19 | 19 | } |
20 | 20 | |
21 | - public function getQueueName(): string |
|
21 | + public function getQueueName (): string |
|
22 | 22 | { |
23 | 23 | return $this->queueName; |
24 | 24 | } |
25 | 25 | |
26 | - public function getId(): string |
|
26 | + public function getId (): string |
|
27 | 27 | { |
28 | 28 | return $this->id; |
29 | 29 | } |
30 | 30 | |
31 | - public function getSerialized(): string |
|
31 | + public function getSerialized (): string |
|
32 | 32 | { |
33 | 33 | return $this->serialized; |
34 | 34 | } |
35 | 35 | |
36 | - public function getDateTime(): \DateTime |
|
36 | + public function getDateTime (): \DateTime |
|
37 | 37 | { |
38 | 38 | return $this->dateTime; |
39 | 39 | } |
@@ -5,11 +5,11 @@ discard block |
||
5 | 5 | interface SchedulerAdapterInterface |
6 | 6 | { |
7 | 7 | |
8 | - public function scheduleCommand(string $queueName, string $id, string $serialized, \DateTime $dateTime); |
|
8 | + public function scheduleCommand (string $queueName, string $id, string $serialized, \DateTime $dateTime); |
|
9 | 9 | |
10 | - public function cancelScheduledCommand(string $queueName, string $id); |
|
10 | + public function cancelScheduledCommand (string $queueName, string $id); |
|
11 | 11 | |
12 | - public function clearSchedule(array $queueNames = null, \DateTime $start = null, \DateTime $end = null); |
|
12 | + public function clearSchedule (array $queueNames = null, \DateTime $start = null, \DateTime $end = null); |
|
13 | 13 | |
14 | 14 | /** |
15 | 15 | * @param \DateTime $now |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | * @param \DateTime|null $startTime Return due commands since $startTime or the beginning of time. |
18 | 18 | * @return ReceivedScheduledCommand[] |
19 | 19 | */ |
20 | - public function receiveDueCommands( |
|
20 | + public function receiveDueCommands ( |
|
21 | 21 | \DateTime $now, |
22 | 22 | int $limit = SchedulerWorker::DEFAULT_THROTTLE, |
23 | 23 | \DateTime $startTime = null |
@@ -10,12 +10,12 @@ |
||
10 | 10 | |
11 | 11 | private $commandBus; |
12 | 12 | |
13 | - public function __construct(CommandBus $commandBus) |
|
13 | + public function __construct (CommandBus $commandBus) |
|
14 | 14 | { |
15 | 15 | $this->commandBus = $commandBus; |
16 | 16 | } |
17 | 17 | |
18 | - public function handle($command) |
|
18 | + public function handle ($command) |
|
19 | 19 | { |
20 | 20 | $this->commandBus->handle($command); |
21 | 21 | } |
@@ -5,5 +5,5 @@ |
||
5 | 5 | interface QueueResolverInterface |
6 | 6 | { |
7 | 7 | |
8 | - public function resolveQueueName($command): string; |
|
8 | + public function resolveQueueName ($command): string; |
|
9 | 9 | } |