@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | public function beforeUpdate(Entity $instance, Space $space) |
| 21 | 21 | { |
| 22 | 22 | $key = $this->getKey($instance, $space); |
| 23 | - if(!array_key_exists($key, $this->created)) { |
|
| 23 | + if (!array_key_exists($key, $this->created)) { |
|
| 24 | 24 | $this->updated[$key] = $instance; |
| 25 | 25 | } |
| 26 | 26 | } |
@@ -29,12 +29,12 @@ discard block |
||
| 29 | 29 | { |
| 30 | 30 | $key = $this->getKey($instance, $space); |
| 31 | 31 | |
| 32 | - if(array_key_exists($key, $this->created)) { |
|
| 32 | + if (array_key_exists($key, $this->created)) { |
|
| 33 | 33 | unset($this->created[$key]); |
| 34 | 34 | return; |
| 35 | 35 | } |
| 36 | 36 | |
| 37 | - if(array_key_exists($key, $this->updated)) { |
|
| 37 | + if (array_key_exists($key, $this->updated)) { |
|
| 38 | 38 | unset($this->updated[$key]); |
| 39 | 39 | } |
| 40 | 40 | |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | $key = [$space->getName()]; |
| 54 | 54 | |
| 55 | 55 | $format = $space->getFormat(); |
| 56 | - foreach($space->getPrimaryIndex()->parts as $part) { |
|
| 56 | + foreach ($space->getPrimaryIndex()->parts as $part) { |
|
| 57 | 57 | $key[] = $instance->{$format[$part[0]]['name']}; |
| 58 | 58 | } |
| 59 | 59 | |
@@ -64,11 +64,11 @@ discard block |
||
| 64 | 64 | { |
| 65 | 65 | $result = (object) []; |
| 66 | 66 | |
| 67 | - foreach(['created', 'updated', 'removed'] as $action) { |
|
| 67 | + foreach (['created', 'updated', 'removed'] as $action) { |
|
| 68 | 68 | $data = []; |
| 69 | - foreach($this->$action as $key => $row) { |
|
| 69 | + foreach ($this->$action as $key => $row) { |
|
| 70 | 70 | list($space) = explode(':', $key); |
| 71 | - if(!array_key_exists($space, $data)) { |
|
| 71 | + if (!array_key_exists($space, $data)) { |
|
| 72 | 72 | $data[$space] = []; |
| 73 | 73 | } |
| 74 | 74 | $data[$space][] = $row; |