@@ -105,7 +105,7 @@ |
||
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 | } |
@@ -104,8 +104,12 @@ |
||
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 | } |
@@ -103,7 +103,9 @@ discard block |
||
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 |
||
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; |