Passed
Branch develop (123dae)
by nguereza
05:52
created
src/ResolverInterface.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,8 +46,7 @@
 block discarded – undo
46 46
 
47 47
 namespace Platine\Container;
48 48
 
49
-interface ResolverInterface
50
-{
49
+interface ResolverInterface {
51 50
 
52 51
     /**
53 52
      * Resolve the instance of the given type
Please login to merge, or discard this patch.
src/Storage.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -46,8 +46,7 @@  discard block
 block discarded – undo
46 46
 
47 47
 namespace Platine\Container;
48 48
 
49
-class Storage implements StorageInterface
50
-{
49
+class Storage implements StorageInterface {
51 50
 
52 51
     /**
53 52
      * The storage name
@@ -112,8 +111,7 @@  discard block
 block discarded – undo
112 111
     /**
113 112
      * {@inheritdoc}
114 113
      */
115
-    public function getInstance(ContainerInterface $container)
116
-    {
114
+    public function getInstance(ContainerInterface $container) {
117 115
         return ($this->closure)($container, $this->parameters);
118 116
     }
119 117
 
Please login to merge, or discard this patch.
src/ContainerInterface.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,8 +51,7 @@
 block discarded – undo
51 51
 use Platine\Container\Exception\ContainerException;
52 52
 use Platine\Container\Exception\NotFoundException;
53 53
 
54
-interface ContainerInterface
55
-{
54
+interface ContainerInterface {
56 55
 
57 56
     /**
58 57
      * Finds an entry of the container by its identifier and returns it.
Please login to merge, or discard this patch.
src/Exception/NotFoundException.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,7 +32,6 @@
 block discarded – undo
32 32
 
33 33
 namespace Platine\Container\Exception;
34 34
 
35
-class NotFoundException extends ContainerException
36
-{
35
+class NotFoundException extends ContainerException {
37 36
 
38 37
 }
Please login to merge, or discard this patch.
src/Exception/ContainerException.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,7 +32,6 @@
 block discarded – undo
32 32
 
33 33
 namespace Platine\Container\Exception;
34 34
 
35
-class ContainerException extends \Exception
36
-{
35
+class ContainerException extends \Exception {
37 36
 
38 37
 }
Please login to merge, or discard this patch.
src/Parameter.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -46,8 +46,7 @@  discard block
 block discarded – undo
46 46
 
47 47
 namespace Platine\Container;
48 48
 
49
-class Parameter implements ParameterInterface
50
-{
49
+class Parameter implements ParameterInterface {
51 50
 
52 51
     /**
53 52
      * The parameter name
@@ -67,8 +66,7 @@  discard block
 block discarded – undo
67 66
      * @param string $name  the name of the parameter
68 67
      * @param \Closure|mixed $value the parameter value
69 68
      */
70
-    public function __construct(string $name, $value)
71
-    {
69
+    public function __construct(string $name, $value) {
72 70
         $this->name = $name;
73 71
         $this->value = $value;
74 72
     }
@@ -84,8 +82,7 @@  discard block
 block discarded – undo
84 82
     /**
85 83
      * {@inheritdoc}
86 84
      */
87
-    public function getValue(ContainerInterface $container)
88
-    {
85
+    public function getValue(ContainerInterface $container) {
89 86
         return ($this->value instanceof \Closure) ? ($this->value)($container) : $this->value;
90 87
     }
91 88
 }
Please login to merge, or discard this patch.
src/ConstructorResolver.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@
 block discarded – undo
78 78
             }
79 79
         }
80 80
 
81
-        $callback = function (\ReflectionParameter $parameter) use ($container, $parameters) {
81
+        $callback = function(\ReflectionParameter $parameter) use ($container, $parameters) {
82 82
             return $this->resolveParameter(
83 83
                 $container,
84 84
                 $parameter,
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,8 +48,7 @@
 block discarded – undo
48 48
 
49 49
 use Platine\Container\Exception\ContainerException;
50 50
 
51
-class ConstructorResolver implements ResolverInterface
52
-{
51
+class ConstructorResolver implements ResolverInterface {
53 52
 
54 53
     /**
55 54
      * {@inheritdoc}
Please login to merge, or discard this patch.
src/Container.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -322,12 +322,12 @@
 block discarded – undo
322 322
         if (is_callable($type)) {
323 323
             return \Closure::fromCallable($type);
324 324
         } elseif (!is_string($type)) {
325
-            return function () use ($type) {
325
+            return function() use ($type) {
326 326
                 return $type;
327 327
             };
328 328
         }
329 329
 
330
-        return function ($container, $parameters) use ($type) {
330
+        return function($container, $parameters) use ($type) {
331 331
             return $container
332 332
                     ->getResolver()
333 333
                     ->resolve($container, $type, $parameters);
Please login to merge, or discard this patch.
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -50,8 +50,7 @@  discard block
 block discarded – undo
50 50
 use Platine\Container\Exception\NotFoundException;
51 51
 use Platine\Container\Exception\ContainerException;
52 52
 
53
-class Container implements ContainerInterface
54
-{
53
+class Container implements ContainerInterface {
55 54
 
56 55
     /**
57 56
      * The container global instance
@@ -120,8 +119,7 @@  discard block
 block discarded – undo
120 119
      * Remove all lock when copy this object
121 120
      * @return void
122 121
      */
123
-    public function __clone()
124
-    {
122
+    public function __clone() {
125 123
         $this->lock = [];
126 124
     }
127 125
 
@@ -269,8 +267,7 @@  discard block
 block discarded – undo
269 267
      * @param  array  $parameters
270 268
      * @return mixed
271 269
      */
272
-    public function make(string $id, array $parameters = [])
273
-    {
270
+    public function make(string $id, array $parameters = []) {
274 271
         if (isset($this->lock[$id])) {
275 272
             throw new ContainerException(sprintf(
276 273
                 'Detected a cyclic dependency while provisioning [%s]',
@@ -303,8 +300,7 @@  discard block
 block discarded – undo
303 300
     /**
304 301
      * {@inheritdoc}
305 302
      */
306
-    public function get(string $id)
307
-    {
303
+    public function get(string $id) {
308 304
         if (!$this->has($id)) {
309 305
             throw new NotFoundException(sprintf('The type/class [%s] does not exist in the container!', $id));
310 306
         }
Please login to merge, or discard this patch.
src/ParameterCollection.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -46,8 +46,7 @@  discard block
 block discarded – undo
46 46
 
47 47
 namespace Platine\Container;
48 48
 
49
-class ParameterCollection
50
-{
49
+class ParameterCollection {
51 50
 
52 51
     /**
53 52
      * The array of parameters
@@ -66,8 +65,7 @@  discard block
 block discarded – undo
66 65
      *
67 66
      * @param array $parameters  the container parameters
68 67
      */
69
-    public function __construct(array $parameters = [])
70
-    {
68
+    public function __construct(array $parameters = []) {
71 69
         foreach ($parameters as $parameter) {
72 70
             if (!$parameter instanceof ParameterInterface) {
73 71
                 throw new \InvalidArgumentException(sprintf(
Please login to merge, or discard this patch.