Completed
Push — refactor-quim ( 7d1438...7042f1 )
by Quim
08:44 queued 06:26
created
src/Domain/Event/DomainEvent.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,8 +36,8 @@
 block discarded – undo
36 36
     public function __construct($origin, $name, $occurredOn, array $body = [])
37 37
     {
38 38
         $this->setOrigin($origin)
39
-             ->setName($name)
40
-             ->setOccurredOn($occurredOn)
39
+                ->setName($name)
40
+                ->setOccurredOn($occurredOn)
41 41
         ;
42 42
         $this->body = $body;
43 43
     }
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
      */
92 92
     protected function setOrigin($origin)
93 93
     {
94
-        if(empty($origin)) {
94
+        if (empty($origin)) {
95 95
             throw new DomainEventException('DomainEvent origin cannot be empty');
96 96
         }
97 97
         $this->origin = $origin;
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
      */
106 106
     protected function setName($name)
107 107
     {
108
-        if(empty($name)) {
108
+        if (empty($name)) {
109 109
             throw new DomainEventException('DomainEvent name cannot be empty');
110 110
         }
111 111
         $this->name = $name;
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
      */
120 120
     protected function setOccurredOn($occurredOn)
121 121
     {
122
-        if(!is_null($occurredOn) && !preg_match('/^\d+(\.\d{1,4})?$/', $occurredOn)) { // accepts also microseconds
122
+        if (!is_null($occurredOn) && !preg_match('/^\d+(\.\d{1,4})?$/', $occurredOn)) { // accepts also microseconds
123 123
             throw new DomainEventException("$occurredOn is not a valid unix timestamp.");
124 124
         }
125 125
         $this->occurredOn = $occurredOn;
Please login to merge, or discard this patch.
src/Domain/Task/Task.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
     public function __construct($name, array $body, $delay=0)
32 32
     {
33 33
         $this->setName($name)
34
-             ->setDelay($delay)
34
+                ->setDelay($delay)
35 35
         ;
36 36
         $this->body = $body;
37 37
     }
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
      * @param array $body
29 29
      * @param int $delay
30 30
      */
31
-    public function __construct($name, array $body, $delay=0)
31
+    public function __construct($name, array $body, $delay = 0)
32 32
     {
33 33
         $this->setName($name)
34 34
              ->setDelay($delay)
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
      */
68 68
     protected function setName($name)
69 69
     {
70
-        if(empty($name)) {
70
+        if (empty($name)) {
71 71
             throw new TaskException('Task name cannot be empty');
72 72
         }
73 73
         $this->name = $name;
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
      */
82 82
     protected function setDelay($delay)
83 83
     {
84
-        if(!is_null($delay) && !preg_match('/^\d+$/', $delay)) {
84
+        if (!is_null($delay) && !preg_match('/^\d+$/', $delay)) {
85 85
             throw new TaskException("Task delay $delay is not a valid delay.");
86 86
         }
87 87
         $this->delay = $delay;
Please login to merge, or discard this patch.