Completed
Pull Request — master (#14)
by Bartek
06:48
created
src/Cmp/Queues/Domain/Event/DomainEvent.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -42,9 +42,9 @@
 block discarded – undo
42 42
     public function __construct($origin, $name, $version, $occurredOn, array $body = [])
43 43
     {
44 44
         $this->setOrigin($origin)
45
-             ->setName($name)
46
-             ->setVersion($version)
47
-             ->setOccurredOn($occurredOn)
45
+                ->setName($name)
46
+                ->setVersion($version)
47
+                ->setOccurredOn($occurredOn)
48 48
         ;
49 49
         $this->body = $body;
50 50
     }
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
      */
107 107
     protected function setOrigin($origin)
108 108
     {
109
-        if(empty($origin)) {
109
+        if (empty($origin)) {
110 110
             throw new DomainEventException('DomainEvent origin cannot be empty');
111 111
         }
112 112
         $this->origin = $origin;
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
      */
121 121
     protected function setName($name)
122 122
     {
123
-        if(empty($name)) {
123
+        if (empty($name)) {
124 124
             throw new DomainEventException('DomainEvent name cannot be empty');
125 125
         }
126 126
         $this->name = $name;
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
      */
135 135
     protected function setVersion($version)
136 136
     {
137
-        if(empty($version)) {
137
+        if (empty($version)) {
138 138
             throw new DomainEventException('DomainEvent version cannot be empty');
139 139
         }
140 140
         $this->version = $version;
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
      */
149 149
     protected function setOccurredOn($occurredOn)
150 150
     {
151
-        if(!is_null($occurredOn) && !preg_match('/^\d+(\.\d{1,4})?$/', $occurredOn)) { // accepts also microseconds
151
+        if (!is_null($occurredOn) && !preg_match('/^\d+(\.\d{1,4})?$/', $occurredOn)) { // accepts also microseconds
152 152
             throw new DomainEventException("$occurredOn is not a valid unix timestamp.");
153 153
         }
154 154
 
Please login to merge, or discard this patch.