@@ -70,9 +70,9 @@ discard block |
||
| 70 | 70 | */ |
| 71 | 71 | public static function convSortedObject() { |
| 72 | 72 | return function($data) { |
| 73 | - $a = (array)$data; // ksort is inplace, so we need a copy |
|
| 73 | + $a = (array) $data; // ksort is inplace, so we need a copy |
|
| 74 | 74 | ksort($a); |
| 75 | - return (object)$a; |
|
| 75 | + return (object) $a; |
|
| 76 | 76 | }; |
| 77 | 77 | } |
| 78 | 78 | |
@@ -83,9 +83,9 @@ discard block |
||
| 83 | 83 | public static function convArrayOfClass($class) { |
| 84 | 84 | return function($data) use ($class) { |
| 85 | 85 | $return = []; |
| 86 | - if($data !== null) { |
|
| 86 | + if ($data !== null) { |
|
| 87 | 87 | foreach ($data as $item) { |
| 88 | - $return[] = new $class((array)$item); |
|
| 88 | + $return[] = new $class((array) $item); |
|
| 89 | 89 | } |
| 90 | 90 | } |
| 91 | 91 | return $return; |
@@ -148,7 +148,7 @@ |
||
| 148 | 148 | // delete empty fields |
| 149 | 149 | $return = array_filter( |
| 150 | 150 | $return, |
| 151 | - function ($value, $key) { |
|
| 151 | + function($value, $key) { |
|
| 152 | 152 | return !is_null($value) || empty($value); |
| 153 | 153 | }, |
| 154 | 154 | ARRAY_FILTER_USE_BOTH // there is no ARRAY_FILTER_USE_VALUE |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | if ($key == 'container') { |
| 97 | 97 | $this->{$key} = new ContainerEntity($value); |
| 98 | 98 | } else if ($key == 'fetch') { |
| 99 | - foreach($value as $fetch) { |
|
| 99 | + foreach ($value as $fetch) { |
|
| 100 | 100 | $this->{$key}[] = new FetchEntity($fetch); |
| 101 | 101 | } |
| 102 | 102 | } else { |
@@ -164,13 +164,13 @@ discard block |
||
| 164 | 164 | $return['container'] = (array) $this->container; |
| 165 | 165 | |
| 166 | 166 | $return['container']['volumes'] = []; |
| 167 | - foreach($this->container->volumes as $volume) { |
|
| 167 | + foreach ($this->container->volumes as $volume) { |
|
| 168 | 168 | $return['container']['volumes'][] = (array) $volume; |
| 169 | 169 | } |
| 170 | 170 | } |
| 171 | 171 | |
| 172 | 172 | $return['fetch'] = []; |
| 173 | - foreach($this->fetch as $fetch) { |
|
| 173 | + foreach ($this->fetch as $fetch) { |
|
| 174 | 174 | $return['fetch'][] = (array) $fetch; |
| 175 | 175 | } |
| 176 | 176 | |