@@ -1,20 +1,20 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if( ! function_exists("app") ){ |
|
4 | - function app($alias = null){ |
|
3 | +if ( ! function_exists("app")) { |
|
4 | + function app($alias = null) { |
|
5 | 5 | static $app = null; |
6 | 6 | |
7 | - if( $app == null ){ |
|
7 | + if ($app == null) { |
|
8 | 8 | $app = new \ProyectoTAU\TAU\Common\ContainerExt(); |
9 | 9 | } |
10 | 10 | |
11 | - if( $alias != null ) |
|
11 | + if ($alias != null) |
|
12 | 12 | return $app->get($alias); |
13 | 13 | |
14 | 14 | return $app; |
15 | 15 | } |
16 | 16 | |
17 | - if( ! function_exists("getConcrete") ) { |
|
17 | + if ( ! function_exists("getConcrete")) { |
|
18 | 18 | function getConcrete($entityManager): \ProyectoTAU\TAU\Common\Repository |
19 | 19 | { |
20 | 20 | $em_class = strstr($entityManager, '::', true); |
@@ -8,8 +8,9 @@ |
||
8 | 8 | $app = new \ProyectoTAU\TAU\Common\ContainerExt(); |
9 | 9 | } |
10 | 10 | |
11 | - if( $alias != null ) |
|
12 | - return $app->get($alias); |
|
11 | + if( $alias != null ) { |
|
12 | + return $app->get($alias); |
|
13 | + } |
|
13 | 14 | |
14 | 15 | return $app; |
15 | 16 | } |
@@ -23,7 +23,7 @@ |
||
23 | 23 | { |
24 | 24 | // \ProyectoTAU\TAU\Common\Logger::debug("$id ".var_export($concrete, true)); |
25 | 25 | |
26 | - if( $this->has($id, $concrete) ) // Replace concrete if id exists |
|
26 | + if ($this->has($id, $concrete)) // Replace concrete if id exists |
|
27 | 27 | { |
28 | 28 | $definition = $this->extend($id); |
29 | 29 | $definition->setConcrete($concrete); |
@@ -23,9 +23,11 @@ |
||
23 | 23 | { |
24 | 24 | // \ProyectoTAU\TAU\Common\Logger::debug("$id ".var_export($concrete, true)); |
25 | 25 | |
26 | - if( $this->has($id, $concrete) ) // Replace concrete if id exists |
|
26 | + if( $this->has($id, $concrete) ) { |
|
27 | + // Replace concrete if id exists |
|
27 | 28 | { |
28 | 29 | $definition = $this->extend($id); |
30 | + } |
|
29 | 31 | $definition->setConcrete($concrete); |
30 | 32 | return $definition; |
31 | 33 |