@@ -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 | } |
@@ -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 | } |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | foreach ($config as $key => $value) { |
| 45 | - $this->container[$prefix . $key] = $value; |
|
| 45 | + $this->container[$prefix.$key] = $value; |
|
| 46 | 46 | } |
| 47 | 47 | } |
| 48 | 48 | |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | */ |
| 97 | 97 | private function createFactoryFactory(ServiceDefinition $definition) |
| 98 | 98 | { |
| 99 | - return function () use ($definition) { |
|
| 99 | + return function() use ($definition) { |
|
| 100 | 100 | $className = $definition->getClass(); |
| 101 | 101 | $factory = new $className(); |
| 102 | 102 | |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | */ |
| 112 | 112 | private function createAliasFactory(ServiceDefinition $definition) |
| 113 | 113 | { |
| 114 | - return function () use ($definition) { |
|
| 114 | + return function() use ($definition) { |
|
| 115 | 115 | return $this->container[$definition->getClass()]; |
| 116 | 116 | }; |
| 117 | 117 | } |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | */ |
| 124 | 124 | private function createInstanceFactory(ServiceDefinition $definition) |
| 125 | 125 | { |
| 126 | - return function () use ($definition) { |
|
| 126 | + return function() use ($definition) { |
|
| 127 | 127 | $className = $definition->getClass(); |
| 128 | 128 | $instance = new $className(...$this->resolveArguments($definition->getArguments())); |
| 129 | 129 | |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | */ |
| 143 | 143 | private function createInflector(InflectorDefinition $definition) |
| 144 | 144 | { |
| 145 | - return function ($subject) use ($definition) { |
|
| 145 | + return function($subject) use ($definition) { |
|
| 146 | 146 | foreach ($definition->getMethods() as $method => $arguments) { |
| 147 | 147 | // @todo - method does not exist |
| 148 | 148 | |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | */ |
| 159 | 159 | private function applyInflectors(Closure $factory) |
| 160 | 160 | { |
| 161 | - return function () use ($factory) { |
|
| 161 | + return function() use ($factory) { |
|
| 162 | 162 | $instance = $factory(); |
| 163 | 163 | |
| 164 | 164 | foreach ($this->inflectors as $interface => $inflector) { |
@@ -179,7 +179,7 @@ discard block |
||
| 179 | 179 | private function resolveArguments(array $arguments) |
| 180 | 180 | { |
| 181 | 181 | return array_map( |
| 182 | - function ($argument) { |
|
| 182 | + function($argument) { |
|
| 183 | 183 | if (!is_string($argument)) { |
| 184 | 184 | return $argument; |
| 185 | 185 | } |