@@ -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 | } |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | foreach ($config as $key => $value) { |
| 48 | - $this->container[$prefix . $key] = $value; |
|
| 48 | + $this->container[$prefix.$key] = $value; |
|
| 49 | 49 | } |
| 50 | 50 | } |
| 51 | 51 | |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | */ |
| 100 | 100 | private function createFactoryFactory(ServiceDefinition $definition) |
| 101 | 101 | { |
| 102 | - return function () use ($definition) { |
|
| 102 | + return function() use ($definition) { |
|
| 103 | 103 | $className = $definition->getClass(); |
| 104 | 104 | $factory = new $className(); |
| 105 | 105 | |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | */ |
| 115 | 115 | private function createAliasFactory(ServiceDefinition $definition) |
| 116 | 116 | { |
| 117 | - return function () use ($definition) { |
|
| 117 | + return function() use ($definition) { |
|
| 118 | 118 | return $this->container[$definition->getClass()]; |
| 119 | 119 | }; |
| 120 | 120 | } |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | */ |
| 127 | 127 | private function createInstanceFactory(ServiceDefinition $definition) |
| 128 | 128 | { |
| 129 | - return function () use ($definition) { |
|
| 129 | + return function() use ($definition) { |
|
| 130 | 130 | $className = $definition->getClass(); |
| 131 | 131 | $instance = new $className(...$this->resolveArguments($definition->getArguments())); |
| 132 | 132 | |
@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | */ |
| 146 | 146 | private function createInflector(InflectorDefinition $definition) |
| 147 | 147 | { |
| 148 | - return function ($subject) use ($definition) { |
|
| 148 | + return function($subject) use ($definition) { |
|
| 149 | 149 | foreach ($definition->getMethods() as $method => $arguments) { |
| 150 | 150 | $subject->$method(...$this->resolveArguments($arguments)); |
| 151 | 151 | } |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | */ |
| 160 | 160 | private function applyInflectors(Closure $factory) |
| 161 | 161 | { |
| 162 | - return function () use ($factory) { |
|
| 162 | + return function() use ($factory) { |
|
| 163 | 163 | $instance = $factory(); |
| 164 | 164 | |
| 165 | 165 | foreach ($this->inflectors as $interface => $inflector) { |
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | private function resolveArguments(array $arguments) |
| 181 | 181 | { |
| 182 | 182 | return array_map( |
| 183 | - function ($argument) { |
|
| 183 | + function($argument) { |
|
| 184 | 184 | if (!is_string($argument)) { |
| 185 | 185 | return $argument; |
| 186 | 186 | } |
@@ -38,7 +38,7 @@ |
||
| 38 | 38 | public function getKeys() |
| 39 | 39 | { |
| 40 | 40 | return array_map( |
| 41 | - function (ServiceDefinition $definition) { |
|
| 41 | + function(ServiceDefinition $definition) { |
|
| 42 | 42 | return $definition->getName(); |
| 43 | 43 | }, |
| 44 | 44 | $this->config |