Completed
Push — master ( 3bf8a8...cec675 )
by Raffael
03:55
created
src/Container.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -305,9 +305,9 @@
 block discarded – undo
305 305
 
306 306
                 $args[$param_name] = $this->findParentService($name, $type_class, $config, $parents);
307 307
             } elseif($param->isDefaultValueAvailable()) {
308
-                 $args[$param_name] = $param->getDefaultValue();
308
+                    $args[$param_name] = $param->getDefaultValue();
309 309
             } elseif($param->allowsNull() && $param->hasType()) {
310
-                 $args[$param_name] = null;
310
+                    $args[$param_name] = null;
311 311
             } else {
312 312
                 throw new Exception\Configuration('no value found for argument '.$param_name.' in method '.$method->getName().' for service '.$name);
313 313
             }
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 /**
6 6
  * Balloon
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
             return $this->service[$name]['instance'];
66 66
         }
67 67
         if (isset($this->registry[$name])) {
68
-            if( $this->registry[$name] instanceof Closure) {
68
+            if ($this->registry[$name] instanceof Closure) {
69 69
                 $this->service[$name]['instance'] = $this->registry[$name]->call($this);
70 70
             } else {
71 71
                 $this->service[$name]['instance'] = $this->registry[$name];
@@ -84,18 +84,18 @@  discard block
 block discarded – undo
84 84
      *
85 85
      * @return array
86 86
      */
87
-    public function __debug(?array $container=null): array
87
+    public function __debug(?array $container = null): array
88 88
     {
89
-        if($container === null) {
89
+        if ($container === null) {
90 90
             $container = $this->service;
91 91
         }
92 92
 
93
-        foreach($container as $name => &$service) {
94
-            if(isset($service['instance'])) {
93
+        foreach ($container as $name => &$service) {
94
+            if (isset($service['instance'])) {
95 95
                 $service['instance'] = 'instanceof '.get_class($service['instance']);
96 96
             }
97 97
 
98
-            if(isset($service['services'])) {
98
+            if (isset($service['services'])) {
99 99
                 $service['services'] = $this->__debug($service['services']);
100 100
             }
101 101
         }
@@ -259,12 +259,12 @@  discard block
 block discarded – undo
259 259
         $parents[$name] = $config;
260 260
         $parents_orig = $parents;
261 261
 
262
-        if(isset($config['calls'])) {
263
-            foreach($config['calls'] as $call) {
262
+        if (isset($config['calls'])) {
263
+            foreach ($config['calls'] as $call) {
264 264
                 $arguments = [];
265 265
                 try {
266 266
                     $method = $class->getMethod($call['method']);
267
-                } catch(\ReflectionException $e) {
267
+                } catch (\ReflectionException $e) {
268 268
                     throw new Exception\Configuration('method '.$call['method'].' is not callable in class '.$class->getName().' for service '.$name);
269 269
                 }
270 270
 
@@ -294,9 +294,9 @@  discard block
 block discarded – undo
294 294
             $type = $param->getClass();
295 295
             $param_name = $param->getName();
296 296
 
297
-            if(isset($config['arguments'][$param_name])) {
297
+            if (isset($config['arguments'][$param_name])) {
298 298
                 $args[$param_name] = $this->parseParam($config['arguments'][$param_name], $name, $type, $config, $parents);
299
-            } elseif($type !== null) {
299
+            } elseif ($type !== null) {
300 300
                 $type_class = $type->getName();
301 301
 
302 302
                 if ($type_class === $name) {
@@ -304,9 +304,9 @@  discard block
 block discarded – undo
304 304
                 }
305 305
 
306 306
                 $args[$param_name] = $this->findParentService($name, $type_class, $config, $parents);
307
-            } elseif($param->isDefaultValueAvailable()) {
307
+            } elseif ($param->isDefaultValueAvailable()) {
308 308
                  $args[$param_name] = $param->getDefaultValue();
309
-            } elseif($param->allowsNull() && $param->hasType()) {
309
+            } elseif ($param->allowsNull() && $param->hasType()) {
310 310
                  $args[$param_name] = null;
311 311
             } else {
312 312
                 throw new Exception\Configuration('no value found for argument '.$param_name.' in method '.$method->getName().' for service '.$name);
@@ -352,7 +352,7 @@  discard block
 block discarded – undo
352 352
                 }
353 353
 
354 354
                 return str_replace($match[0], $env, $param);
355
-            } elseif(preg_match('#^\{(.*)\}$#', $param, $match)) {
355
+            } elseif (preg_match('#^\{(.*)\}$#', $param, $match)) {
356 356
                 return $this->findParentService($match[1], $match[1], $config, $parents);
357 357
             }
358 358
 
Please login to merge, or discard this patch.
src/Exception/ServiceNotFound.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 /**
6 6
  * Micro
Please login to merge, or discard this patch.
src/Exception/EnvVariableNotFound.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 /**
6 6
  * Micro
Please login to merge, or discard this patch.
src/Exception/ServiceAlreadyExists.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 /**
6 6
  * Micro
Please login to merge, or discard this patch.
src/Exception/Configuration.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 /**
6 6
  * Micro
Please login to merge, or discard this patch.
src/Exception/Logic.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 /**
6 6
  * Micro
Please login to merge, or discard this patch.