@@ -25,7 +25,7 @@ |
||
| 25 | 25 | public function getKeys() |
| 26 | 26 | { |
| 27 | 27 | return array_map( |
| 28 | - function (ServiceDefinition $definition) { |
|
| 28 | + function(ServiceDefinition $definition) { |
|
| 29 | 29 | return $definition->getKey(); |
| 30 | 30 | }, |
| 31 | 31 | $this->config |
@@ -26,8 +26,8 @@ discard block |
||
| 26 | 26 | $this->prefix = $prefix; |
| 27 | 27 | $this->config = $config; |
| 28 | 28 | $this->provides = array_map( |
| 29 | - function ($key) { |
|
| 30 | - return $this->keyPrefix() . $key; |
|
| 29 | + function($key) { |
|
| 30 | + return $this->keyPrefix().$key; |
|
| 31 | 31 | }, |
| 32 | 32 | $config->getKeys() |
| 33 | 33 | ); |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | $prefix = $this->keyPrefix(); |
| 39 | 39 | |
| 40 | 40 | foreach ($this->config as $key => $value) { |
| 41 | - $this->container->share($prefix . $key, function () use ($value) { |
|
| 41 | + $this->container->share($prefix.$key, function() use ($value) { |
|
| 42 | 42 | return $value; |
| 43 | 43 | }); |
| 44 | 44 | } |
@@ -53,6 +53,6 @@ discard block |
||
| 53 | 53 | return ''; |
| 54 | 54 | } |
| 55 | 55 | |
| 56 | - return $this->prefix . $this->config->getSeparator(); |
|
| 56 | + return $this->prefix.$this->config->getSeparator(); |
|
| 57 | 57 | } |
| 58 | 58 | } |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | foreach ($config as $key => $value) { |
| 38 | - $this->container[$prefix . $key] = $value; |
|
| 38 | + $this->container[$prefix.$key] = $value; |
|
| 39 | 39 | } |
| 40 | 40 | } |
| 41 | 41 | |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | */ |
| 91 | 91 | private function createFactoryFactory(ServiceDefinition $definition) |
| 92 | 92 | { |
| 93 | - return function () use ($definition) { |
|
| 93 | + return function() use ($definition) { |
|
| 94 | 94 | $className = $definition->getClass(); |
| 95 | 95 | $factory = new $className(); |
| 96 | 96 | |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | */ |
| 106 | 106 | private function createAliasFactory(ServiceDefinition $definition) |
| 107 | 107 | { |
| 108 | - return function () use ($definition) { |
|
| 108 | + return function() use ($definition) { |
|
| 109 | 109 | return $this->container->get($definition->getClass()); |
| 110 | 110 | }; |
| 111 | 111 | } |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | */ |
| 118 | 118 | private function createInstanceFactory(ServiceDefinition $definition) |
| 119 | 119 | { |
| 120 | - return function () use ($definition) { |
|
| 120 | + return function() use ($definition) { |
|
| 121 | 121 | $className = $definition->getClass(); |
| 122 | 122 | $instance = new $className(...$this->resolveArguments($definition->getArguments())); |
| 123 | 123 | |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | private function resolveArguments(array $arguments) |
| 138 | 138 | { |
| 139 | 139 | return array_map( |
| 140 | - function ($argument) { |
|
| 140 | + function($argument) { |
|
| 141 | 141 | if (!is_string($argument)) { |
| 142 | 142 | return $argument; |
| 143 | 143 | } |
@@ -71,7 +71,7 @@ |
||
| 71 | 71 | public static function container() |
| 72 | 72 | { |
| 73 | 73 | if (!self::$containerIdentifier) { |
| 74 | - self::$containerIdentifier = uniqid(__CLASS__ . '::CONTAINER_ID::'); |
|
| 74 | + self::$containerIdentifier = uniqid(__CLASS__.'::CONTAINER_ID::'); |
|
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | return self::$containerIdentifier; |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | */ |
| 95 | 95 | private function createAliasFactory(ServiceDefinition $definition) |
| 96 | 96 | { |
| 97 | - return function () use ($definition) { |
|
| 97 | + return function() use ($definition) { |
|
| 98 | 98 | return $this->getContainer()->get($definition->getClass()); |
| 99 | 99 | }; |
| 100 | 100 | } |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | */ |
| 107 | 107 | private function createFactoryFactory(ServiceDefinition $definition) |
| 108 | 108 | { |
| 109 | - return function () use ($definition) { |
|
| 109 | + return function() use ($definition) { |
|
| 110 | 110 | $className = $definition->getClass(); |
| 111 | 111 | $factory = new $className(); |
| 112 | 112 | |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | private function injectContainer(array $arguments) |
| 123 | 123 | { |
| 124 | 124 | return array_map( |
| 125 | - function ($argument) { |
|
| 125 | + function($argument) { |
|
| 126 | 126 | return ($argument === Configurator::container()) |
| 127 | 127 | ? $this->container |
| 128 | 128 | : $argument; |
@@ -139,7 +139,7 @@ discard block |
||
| 139 | 139 | private function resolveArguments(array $arguments) |
| 140 | 140 | { |
| 141 | 141 | return array_map( |
| 142 | - function ($argument) { |
|
| 142 | + function($argument) { |
|
| 143 | 143 | if ($argument === Configurator::container()) { |
| 144 | 144 | return $this->container; |
| 145 | 145 | } |