Completed
Push — main ( f39e0a...8d9522 )
by James Ekow Abaka
26s
created
src/Bindings.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -40,9 +40,9 @@  discard block
 block discarded – undo
40 40
      * @param mixed $value
41 41
      * @return self
42 42
      */
43
-    public function to(string|array|callable $value): Bindings
43
+    public function to(string | array | callable $value): Bindings
44 44
     {
45
-        if(isset($this->bindings[$this->activeKey])) {
45
+        if (isset($this->bindings[$this->activeKey])) {
46 46
             $this->bindings[$this->activeKey]['binding'] = $value;
47 47
         } else {
48 48
             $this->bindings[$this->activeKey] = ['binding' => $value, 'calls' => [], 'properties' => []];
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
     public function get(string $key): array
60 60
     {
61 61
         $binding = $this->bindings[$key];
62
-        if(!isset($binding['binding'])) {
62
+        if (!isset($binding['binding'])) {
63 63
             $binding['binding'] = $key;
64 64
         }
65 65
         return $binding;
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
      */
94 94
     private function setArrayBinding(array $binding): void
95 95
     {
96
-        if(isset($binding[0])) {
96
+        if (isset($binding[0])) {
97 97
             $this->to($binding[0]);
98 98
         }
99 99
 
@@ -107,9 +107,9 @@  discard block
 block discarded – undo
107 107
      */
108 108
     public function merge(array $bindings): void
109 109
     {
110
-        foreach($bindings as $key => $binding) {
110
+        foreach ($bindings as $key => $binding) {
111 111
             $this->activeKey = $key;
112
-            if(is_array($binding)) {
112
+            if (is_array($binding)) {
113 113
                 $this->setArrayBinding($binding);
114 114
             } else {
115 115
                 $this->bindings[$key] = ['binding' => $binding, 'calls' => [], 'properties' => []];
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
         return $this;
124 124
     }
125 125
     
126
-    public function with(string|array|callable $value): Bindings
126
+    public function with(string | array | callable $value): Bindings
127 127
     {
128 128
         return $this->to($value);
129 129
     }
Please login to merge, or discard this patch.