@@ -92,17 +92,17 @@ discard block |
||
92 | 92 | * @throws QueryException if the class could not be found or instantiated |
93 | 93 | */ |
94 | 94 | public function resolve($name) { |
95 | - $baseMsg = 'Could not resolve ' . $name . '!'; |
|
95 | + $baseMsg = 'Could not resolve '.$name.'!'; |
|
96 | 96 | try { |
97 | 97 | $class = new ReflectionClass($name); |
98 | 98 | if ($class->isInstantiable()) { |
99 | 99 | return $this->buildClass($class); |
100 | 100 | } else { |
101 | - throw new QueryException($baseMsg . |
|
101 | + throw new QueryException($baseMsg. |
|
102 | 102 | ' Class can not be instantiated'); |
103 | 103 | } |
104 | - } catch(ReflectionException $e) { |
|
105 | - throw new QueryException($baseMsg . ' ' . $e->getMessage()); |
|
104 | + } catch (ReflectionException $e) { |
|
105 | + throw new QueryException($baseMsg.' '.$e->getMessage()); |
|
106 | 106 | } |
107 | 107 | } |
108 | 108 | |
@@ -112,12 +112,12 @@ discard block |
||
112 | 112 | return $this->offsetGet($name); |
113 | 113 | } else if ($autoload) { |
114 | 114 | $object = $this->resolve($name); |
115 | - $this->registerService($name, function () use ($object) { |
|
115 | + $this->registerService($name, function() use ($object) { |
|
116 | 116 | return $object; |
117 | 117 | }); |
118 | 118 | return $object; |
119 | 119 | } |
120 | - throw new QueryException('Could not resolve ' . $name . '!'); |
|
120 | + throw new QueryException('Could not resolve '.$name.'!'); |
|
121 | 121 | } |
122 | 122 | |
123 | 123 | /** |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | */ |
140 | 140 | public function registerService($name, Closure $closure, $shared = true) { |
141 | 141 | $name = $this->sanitizeName($name); |
142 | - if (isset($this[$name])) { |
|
142 | + if (isset($this[$name])) { |
|
143 | 143 | unset($this[$name]); |
144 | 144 | } |
145 | 145 | if ($shared) { |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | * @param string $target the target that should be resolved instead |
158 | 158 | */ |
159 | 159 | public function registerAlias($alias, $target) { |
160 | - $this->registerService($alias, function (IContainer $container) use ($target) { |
|
160 | + $this->registerService($alias, function(IContainer $container) use ($target) { |
|
161 | 161 | return $container->query($target); |
162 | 162 | }, false); |
163 | 163 | } |