@@ -16,7 +16,7 @@ |
||
16 | 16 | public function execute(object $command, callable $next) |
17 | 17 | { |
18 | 18 | $commandName = \get_class($command); |
19 | - $commandHandler = $commandName.$this->handler; |
|
19 | + $commandHandler = $commandName . $this->handler; |
|
20 | 20 | return // TODO: remove return from Coomands. It's for Queries only!!! |
21 | 21 | app()->get($commandHandler)->handle($command); |
22 | 22 | } |
@@ -287,9 +287,9 @@ discard block |
||
287 | 287 | 'available' => $available |
288 | 288 | ]; |
289 | 289 | |
290 | - foreach($from as $xKey => $xs) |
|
291 | - foreach($xs as $yKey => $pair) |
|
292 | - if( $yKey === $entityY->getId() ) { |
|
290 | + foreach ($from as $xKey => $xs) |
|
291 | + foreach ($xs as $yKey => $pair) |
|
292 | + if ($yKey === $entityY->getId()) { |
|
293 | 293 | $r[$who][$xKey] = $pair[0]; |
294 | 294 | unset($r['available'][$xKey]); |
295 | 295 | } |
@@ -304,8 +304,8 @@ discard block |
||
304 | 304 | 'available' => $available |
305 | 305 | ]; |
306 | 306 | |
307 | - foreach($from as $xKey => $xs) |
|
308 | - foreach($xs as $yKey => $pair) |
|
307 | + foreach ($from as $xKey => $xs) |
|
308 | + foreach ($xs as $yKey => $pair) |
|
309 | 309 | if ($xKey === $entityX->getId()) { |
310 | 310 | $r[$who][$yKey] = $pair[1]; |
311 | 311 | unset($r['available'][$yKey]); |
@@ -317,8 +317,8 @@ discard block |
||
317 | 317 | private function failIfNotExists($entity, $id) |
318 | 318 | { |
319 | 319 | $datastore = strtolower($entity) . 'DataStore'; |
320 | - if( ! isset($this->$datastore[$id]) ){ |
|
321 | - throw new InvalidArgumentException(ucfirst($entity)." with id = {$id} not found"); |
|
320 | + if ( ! isset($this->$datastore[$id])) { |
|
321 | + throw new InvalidArgumentException(ucfirst($entity) . " with id = {$id} not found"); |
|
322 | 322 | } |
323 | 323 | } |
324 | 324 | } |