Completed
Push — master ( 69518c...2d09f8 )
by Dayle
119:39 queued 116:22
created
src/Kurenai/Document.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -105,7 +105,7 @@
 block discarded – undo
105 105
     public function get($key = null)
106 106
     {
107 107
         if (is_null($key)) return $this->metadata;
108
-        if (! array_key_exists($key, $this->metadata)) return null;
108
+        if (!array_key_exists($key, $this->metadata)) return null;
109 109
         return $this->metadata[$key];
110 110
     }
111 111
 }
Please login to merge, or discard this patch.
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -104,8 +104,12 @@
 block discarded – undo
104 104
      */
105 105
     public function get($key = null)
106 106
     {
107
-        if (is_null($key)) return $this->metadata;
108
-        if (! array_key_exists($key, $this->metadata)) return null;
107
+        if (is_null($key)) {
108
+         return $this->metadata;
109
+        }
110
+        if (! array_key_exists($key, $this->metadata)) {
111
+         return null;
112
+        }
109 113
         return $this->metadata[$key];
110 114
     }
111 115
 }
Please login to merge, or discard this patch.
src/Kurenai/DocumentParser.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -103,7 +103,9 @@  discard block
 block discarded – undo
103 103
     public function parseSection($source, $offset)
104 104
     {
105 105
         $sections = preg_split(self::SECTION_SPLITTER, $source, 2);
106
-        if (count($sections) != 2) throw new TooFewSectionsException();
106
+        if (count($sections) != 2) {
107
+         throw new TooFewSectionsException();
108
+        }
107 109
         return trim($sections[$offset]);
108 110
     }
109 111
 
@@ -119,7 +121,9 @@  discard block
 block discarded – undo
119 121
         $lines = preg_split(self::META_LINE_SPLITTER, $source);
120 122
         foreach ($lines as $line) {
121 123
             $parts = preg_split(self::META_SPLITTER, $line, 2);
122
-            if (count($parts) !== 2) continue;
124
+            if (count($parts) !== 2) {
125
+             continue;
126
+            }
123 127
             $key = strtolower(trim($parts[0]));
124 128
             $value = trim($parts[1]);
125 129
             $metadata[$key] = $value;
Please login to merge, or discard this patch.