@@ -11,9 +11,9 @@ discard block |
||
| 11 | 11 | |
| 12 | 12 | if (is_array(current($array))) { // with sections |
| 13 | 13 | foreach ($array as $section => $data) { |
| 14 | - $ret .= PHP_EOL . PHP_EOL . self::section($section); |
|
| 14 | + $ret .= PHP_EOL.PHP_EOL.self::section($section); |
|
| 15 | 15 | foreach ($data as $key => $value) { |
| 16 | - $ret .= PHP_EOL . self::line($key, $value); |
|
| 16 | + $ret .= PHP_EOL.self::line($key, $value); |
|
| 17 | 17 | } |
| 18 | 18 | } |
| 19 | 19 | } else { // no section |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | { |
| 30 | 30 | // https://secure.php.net/manual/en/function.parse-ini-file.php |
| 31 | 31 | $ret = parse_ini_file($filepath, $with_sections, $mode); |
| 32 | - if($ret === false) |
|
| 32 | + if ($ret === false) |
|
| 33 | 33 | return null; |
| 34 | 34 | |
| 35 | 35 | return $ret; |
@@ -29,8 +29,9 @@ |
||
| 29 | 29 | { |
| 30 | 30 | // https://secure.php.net/manual/en/function.parse-ini-file.php |
| 31 | 31 | $ret = parse_ini_file($filepath, $with_sections, $mode); |
| 32 | - if($ret === false) |
|
| 33 | - return null; |
|
| 32 | + if($ret === false) { |
|
| 33 | + return null; |
|
| 34 | + } |
|
| 34 | 35 | |
| 35 | 36 | return $ret; |
| 36 | 37 | } |
@@ -41,6 +41,6 @@ |
||
| 41 | 41 | if (json_last_error() === JSON_ERROR_NONE) { |
| 42 | 42 | return false; |
| 43 | 43 | } |
| 44 | - throw new \Exception('ParsingException: '.json_last_error_msg());; |
|
| 44 | + throw new \Exception('ParsingException: '.json_last_error_msg()); ; |
|
| 45 | 45 | } |
| 46 | 46 | } |
@@ -67,7 +67,7 @@ |
||
| 67 | 67 | public function __toString() |
| 68 | 68 | { |
| 69 | 69 | $ret = file_get_contents($this->path()); |
| 70 | - if($ret === false) |
|
| 70 | + if ($ret === false) |
|
| 71 | 71 | $ret = $this->path(); |
| 72 | 72 | |
| 73 | 73 | return $ret; |
@@ -67,8 +67,9 @@ |
||
| 67 | 67 | public function __toString() |
| 68 | 68 | { |
| 69 | 69 | $ret = file_get_contents($this->path()); |
| 70 | - if($ret === false) |
|
| 71 | - $ret = $this->path(); |
|
| 70 | + if($ret === false) { |
|
| 71 | + $ret = $this->path(); |
|
| 72 | + } |
|
| 72 | 73 | |
| 73 | 74 | return $ret; |
| 74 | 75 | } |