Passed
Push — master ( 9670ea...dc3621 )
by Todd
02:03
created
src/Config/MutableConfig.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,9 @@
 block discarded – undo
37 37
 
38 38
   private function nextNumericIndex() {
39 39
     $numericKeys = array_filter(array_keys($this->rawValues()), 'is_numeric');
40
-    if (count($numericKeys) === 0) return 0;
40
+    if (count($numericKeys) === 0) {
41
+      return 0;
42
+    }
41 43
     return max($numericKeys) + 1;
42 44
   }
43 45
 }
44 46
\ No newline at end of file
Please login to merge, or discard this patch.
src/Config.php 2 patches
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
   private $values   = [];
13 13
 
14 14
   public function __construct(array $arrayConfig = []) {
15
-    foreach($arrayConfig as $key => $value)
15
+    foreach ($arrayConfig as $key => $value)
16 16
       $this->offsetSet($key, $value);
17 17
 
18 18
     $this->onConstruct();
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 
36 36
   public function toArray() {
37 37
     return array_map(
38
-        function ($value) {
38
+        function($value) {
39 39
           return $this->hasToArray($value) ? $value->toArray() : $value;
40 40
         },
41 41
         $this->values
@@ -86,18 +86,18 @@  discard block
 block discarded – undo
86 86
 
87 87
 
88 88
   # Iterator
89
-  public function rewind()  { return reset($this->values);        }
90
-  public function key()     { return key($this->values);          }
91
-  public function current() { return current($this->values);      }
92
-  public function next()    { return next($this->values);         }
93
-  public function valid()   { return key($this->values) !== null; }
89
+  public function rewind() { return reset($this->values); }
90
+  public function key() { return key($this->values); }
91
+  public function current() { return current($this->values); }
92
+  public function next() { return next($this->values); }
93
+  public function valid() { return key($this->values) !== null; }
94 94
 
95 95
 
96 96
   # Magic Property Access
97
-  public function __set($offset, $value) { $this->offsetSet($offset, $value);   }
98
-  public function __unset($offset)       { $this->offsetUnset($offset);         }
99
-  public function __get($offset)         { return $this->offsetGet($offset);    }
100
-  public function __isset($offset)       { return $this->offsetExists($offset); }
97
+  public function __set($offset, $value) { $this->offsetSet($offset, $value); }
98
+  public function __unset($offset) { $this->offsetUnset($offset); }
99
+  public function __get($offset) { return $this->offsetGet($offset); }
100
+  public function __isset($offset) { return $this->offsetExists($offset); }
101 101
 
102 102
   /**
103 103
    * @param array $data
Please login to merge, or discard this patch.
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -14,8 +14,9 @@  discard block
 block discarded – undo
14 14
   private $values   = [];
15 15
 
16 16
   public function __construct(array $arrayConfig = []) {
17
-    foreach($arrayConfig as $key => $value)
18
-      $this->offsetSet($key, $value);
17
+    foreach($arrayConfig as $key => $value) {
18
+          $this->offsetSet($key, $value);
19
+    }
19 20
 
20 21
     $this->onConstruct();
21 22
   }
@@ -64,8 +65,9 @@  discard block
 block discarded – undo
64 65
   }
65 66
 
66 67
   public function offsetGet($offset) {
67
-    if (!$this->offsetExists($offset))
68
-      throw new \OutOfBoundsException("offset '{$offset}' does not exist");
68
+    if (!$this->offsetExists($offset)) {
69
+          throw new \OutOfBoundsException("offset '{$offset}' does not exist");
70
+    }
69 71
     return $this->values[$offset];
70 72
   }
71 73
 
@@ -117,7 +119,8 @@  discard block
 block discarded – undo
117 119
   }
118 120
 
119 121
   private function blockIfLocked() {
120
-    if ($this->isLocked())
121
-      throw new CanNotMutateException();
122
+    if ($this->isLocked()) {
123
+          throw new CanNotMutateException();
124
+    }
122 125
   }
123 126
 }
124 127
\ No newline at end of file
Please login to merge, or discard this patch.
src/Config/PathEval.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -14,14 +14,14 @@  discard block
 block discarded – undo
14 14
     $this->config = $config;
15 15
   }
16 16
 
17
-  public function find($path, $default=null, $delimiter='.') {
17
+  public function find($path, $default = null, $delimiter = '.') {
18 18
     if ($this->pathStartsWithConfig($path, $delimiter))
19 19
       return $this->evalSubPath($path, $delimiter, $default);
20 20
 
21 21
     return $this->get($this->getFirstToken($path, $delimiter), $default);
22 22
   }
23 23
 
24
-  private function get($name, $default=null) {
24
+  private function get($name, $default = null) {
25 25
     return $this->config->get($name, $default);
26 26
   }
27 27
 
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
   }
35 35
 
36 36
   private function getFirstToken($path, $delimiter) {
37
-    return $this->gettok($path, $delimiter,0);
37
+    return $this->gettok($path, $delimiter, 0);
38 38
   }
39 39
 
40 40
   private function evalSubPath($path, $delimiter, $default) {
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,8 +15,9 @@
 block discarded – undo
15 15
   }
16 16
 
17 17
   public function find($path, $default=null, $delimiter='.') {
18
-    if ($this->pathStartsWithConfig($path, $delimiter))
19
-      return $this->evalSubPath($path, $delimiter, $default);
18
+    if ($this->pathStartsWithConfig($path, $delimiter)) {
19
+          return $this->evalSubPath($path, $delimiter, $default);
20
+    }
20 21
 
21 22
     return $this->get($this->getFirstToken($path, $delimiter), $default);
22 23
   }
Please login to merge, or discard this patch.