@@ -21,7 +21,7 @@ |
||
21 | 21 | |
22 | 22 | $next($command); |
23 | 23 | |
24 | - } catch (\Exception $e){ |
|
24 | + } catch (\Exception $e) { |
|
25 | 25 | $this->entityManager->rollback(); |
26 | 26 | throw $e; |
27 | 27 | } |
@@ -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 | app()->get($commandHandler)->handle($command); |
21 | 21 | } |
22 | 22 | } |
@@ -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 app()->get($commandHandler)->handle($command); |
21 | 21 | } |
22 | 22 | } |
@@ -1,21 +1,21 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | |
4 | -if( ! function_exists("app") ){ |
|
5 | - function app($alias = null){ |
|
4 | +if ( ! function_exists("app")) { |
|
5 | + function app($alias = null) { |
|
6 | 6 | static $app = null; |
7 | 7 | |
8 | - if( $app == null ){ |
|
8 | + if ($app == null) { |
|
9 | 9 | $app = new \League\Container\Container(); |
10 | 10 | } |
11 | 11 | |
12 | - if( $alias != null ) |
|
12 | + if ($alias != null) |
|
13 | 13 | return $app->get($alias); |
14 | 14 | |
15 | 15 | return $app; |
16 | 16 | } |
17 | 17 | |
18 | - if( ! function_exists("getConcrete") ) { |
|
18 | + if ( ! function_exists("getConcrete")) { |
|
19 | 19 | function getConcrete($entityManager): \ProyectoTAU\TAU\Common\Repository |
20 | 20 | { |
21 | 21 | $em_class = strstr($entityManager, '::', true); |
@@ -9,8 +9,9 @@ |
||
9 | 9 | $app = new \League\Container\Container(); |
10 | 10 | } |
11 | 11 | |
12 | - if( $alias != null ) |
|
13 | - return $app->get($alias); |
|
12 | + if( $alias != null ) { |
|
13 | + return $app->get($alias); |
|
14 | + } |
|
14 | 15 | |
15 | 16 | return $app; |
16 | 17 | } |