Passed
Push — master ( d08b25...ea07b3 )
by Todd
02:23
created
src/Config/MutableConfig.php 1 patch
Braces   +12 added lines, -4 removed lines patch added patch discarded remove patch
@@ -26,9 +26,15 @@  discard block
 block discarded – undo
26 26
   }
27 27
 
28 28
   private function isConfigObjectMerge($key, $value) {
29
-    if (!$this->offsetExists($key)) return false;
30
-    if (!$this->isConfigObject($value)) return false;
31
-    if (!$this->isConfigObject($this->{$key})) return false;
29
+    if (!$this->offsetExists($key)) {
30
+      return false;
31
+    }
32
+    if (!$this->isConfigObject($value)) {
33
+      return false;
34
+    }
35
+    if (!$this->isConfigObject($this->{$key})) {
36
+      return false;
37
+    }
32 38
     return true;
33 39
   }
34 40
 
@@ -38,7 +44,9 @@  discard block
 block discarded – undo
38 44
 
39 45
   private function nextNumericIndex() {
40 46
     $numericKeys = array_filter(array_keys($this->rawValues()), 'is_numeric');
41
-    if (count($numericKeys) === 0) return 0;
47
+    if (count($numericKeys) === 0) {
48
+      return 0;
49
+    }
42 50
     return max($numericKeys) + 1;
43 51
   }
44 52
 }
45 53
\ No newline at end of file
Please login to merge, or discard this patch.
src/Config.php 1 patch
Braces   +12 added lines, -8 removed lines patch added patch discarded remove patch
@@ -12,8 +12,9 @@  discard block
 block discarded – undo
12 12
   private $values   = [];
13 13
 
14 14
   public function __construct(array $arrayConfig = []) {
15
-    foreach($arrayConfig as $key => $value)
16
-      $this->offsetSet($key, $value);
15
+    foreach($arrayConfig as $key => $value) {
16
+          $this->offsetSet($key, $value);
17
+    }
17 18
 
18 19
     $this->onConstruct();
19 20
   }
@@ -48,8 +49,9 @@  discard block
 block discarded – undo
48 49
   public function path($path, $default = null, $delimiter = '.') {
49 50
     $tokens = explode($delimiter, $path);
50 51
     $token  = array_shift($tokens);
51
-    if ($this->get($token) instanceof self)
52
-      return $this[$token]->path(implode('.', $tokens), $default);
52
+    if ($this->get($token) instanceof self) {
53
+          return $this[$token]->path(implode('.', $tokens), $default);
54
+    }
53 55
     return $this->get($token, $default);
54 56
   }
55 57
 
@@ -66,8 +68,9 @@  discard block
 block discarded – undo
66 68
   }
67 69
 
68 70
   public function offsetGet($offset) {
69
-    if (!$this->offsetExists($offset))
70
-      throw new \OutOfBoundsException("offset '{$offset}' does not exist");
71
+    if (!$this->offsetExists($offset)) {
72
+          throw new \OutOfBoundsException("offset '{$offset}' does not exist");
73
+    }
71 74
     return $this->values[$offset];
72 75
   }
73 76
 
@@ -119,7 +122,8 @@  discard block
 block discarded – undo
119 122
   }
120 123
 
121 124
   private function blockIfLocked() {
122
-    if ($this->isLocked())
123
-      throw new CanNotMutateException();
125
+    if ($this->isLocked()) {
126
+          throw new CanNotMutateException();
127
+    }
124 128
   }
125 129
 }
126 130
\ No newline at end of file
Please login to merge, or discard this patch.