Passed
Branch master (2de6ce)
by Jean
02:35
created
src/Exceptions/BadTargetTypeException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
 {
15 15
     public function __construct($callchain, $expected_target, $target)
16 16
     {
17
-        $this->message = "You are trying to define a target of type ".gettype($target)." for the $callchain allowing only: ".$expected_target;
17
+        $this->message = "You are trying to define a target of type " . gettype($target) . " for the $callchain allowing only: " . $expected_target;
18 18
     }
19 19
     
20 20
     /**/
Please login to merge, or discard this patch.
src/Exceptions/BadTargetClassException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
 {
15 15
     public function __construct($callchain, $expected_target, $target)
16 16
     {
17
-        $this->message = "You are trying to define a target of class ".get_class($target)." for the $callchain allowing only targets of class ".$expected_target;
17
+        $this->message = "You are trying to define a target of class " . get_class($target) . " for the $callchain allowing only targets of class " . $expected_target;
18 18
     }
19 19
     
20 20
     /**/
Please login to merge, or discard this patch.
src/Exceptions/UndefinedTargetClassException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
 {
15 15
     public function __construct($callchain, $expected_target)
16 16
     {
17
-        $this->message = "The expected target of $callchain is neither a defined class nor a native type: ". $expected_target;
17
+        $this->message = "The expected target of $callchain is neither a defined class nor a native type: " . $expected_target;
18 18
     }
19 19
     
20 20
     /**/
Please login to merge, or discard this patch.
src/Exceptions/BadTargetInterfaceException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
 {
15 15
     public function __construct($callchain, $expected_target, $target)
16 16
     {
17
-        $this->message = "You are trying to define a target of class ".get_class($target)." for the $callchain allowing only targets implementing ".$expected_target;
17
+        $this->message = "You are trying to define a target of class " . get_class($target) . " for the $callchain allowing only targets implementing " . $expected_target;
18 18
     }
19 19
     
20 20
     /**/
Please login to merge, or discard this patch.
src/DeferredCallChain.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
      * 
32 32
      * @param string $key The entry to acces
33 33
      */
34
-    public function __construct($class_type_or_instance=null)
34
+    public function __construct($class_type_or_instance = null)
35 35
     {
36 36
         if ($class_type_or_instance) {
37 37
             $this->expectedTarget = $class_type_or_instance;
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
         foreach ($this->stack as $i => $call) {
94 94
             if (isset($call['method'])) {
95 95
                 $string .= '->';
96
-                $string .= $call['method'].'(';
96
+                $string .= $call['method'] . '(';
97 97
                 $string .= implode(', ', array_map(function($argument) {
98 98
                     return var_export($argument, true);
99 99
                 }, $call['arguments']));
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
      * @param  $target The target to apply the callchain on
114 114
      * @return The value returned once the call chain is called uppon $target
115 115
      */
116
-    public function __invoke($target=null)
116
+    public function __invoke($target = null)
117 117
     {
118 118
         if (is_object($this->expectedTarget)) {
119 119
             if ($target) {
@@ -124,12 +124,12 @@  discard block
 block discarded – undo
124 124
         }
125 125
         elseif (is_string($this->expectedTarget)) {
126 126
             if (class_exists($this->expectedTarget)) {
127
-                if (! $target instanceof $this->expectedTarget) {
127
+                if (!$target instanceof $this->expectedTarget) {
128 128
                     throw new BadTargetClassException($this, $this->expectedTarget, $target);
129 129
                 }
130 130
             }
131 131
             elseif (interface_exists($this->expectedTarget)) {
132
-                if (! $target instanceof $this->expectedTarget) {
132
+                if (!$target instanceof $this->expectedTarget) {
133 133
                     throw new BadTargetInterfaceException($this, $this->expectedTarget, $target);
134 134
                 }
135 135
             }
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
                     $out = call_user_func_array([$out, $call['method']], $call['arguments']);
155 155
                 }
156 156
                 else {
157
-                    $out = $out[ $call['entry'] ];
157
+                    $out = $out[$call['entry']];
158 158
                 }
159 159
             }
160 160
             catch (\Exception $e) {
Please login to merge, or discard this patch.
src/functions.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
-if ( ! function_exists('spl_object_id')) {
3
+if (!function_exists('spl_object_id')) {
4 4
     /**
5 5
      * @see https://secure.php.net/manual/en/function.spl-object-id.php
6 6
      * This method doesn't exist before PHP 7.2.0
Please login to merge, or discard this patch.
src/Exceptions/TargetAlreadyDefinedException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
 {
15 15
     public function __construct($callchain, $expected_target, $target)
16 16
     {
17
-        $this->message = "You are trying to define the target ".spl_object_id($target)." for the $callchain which already has one: ".spl_object_id($expected_target);
17
+        $this->message = "You are trying to define the target " . spl_object_id($target) . " for the $callchain which already has one: " . spl_object_id($expected_target);
18 18
     }
19 19
     
20 20
     /**/
Please login to merge, or discard this patch.