@@ -3,8 +3,8 @@ |
||
| 3 | 3 | namespace Noodlehaus\FileParser; |
| 4 | 4 | |
| 5 | 5 | use Exception; |
| 6 | -use Symfony\Component\Yaml\Yaml as YamlParser; |
|
| 7 | 6 | use Noodlehaus\Exception\ParseException; |
| 7 | +use Symfony\Component\Yaml\Yaml as YamlParser; |
|
| 8 | 8 | |
| 9 | 9 | /** |
| 10 | 10 | * YAML file parser |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | if (function_exists('json_last_error_msg')) { |
| 29 | 29 | $error_message = json_last_error_msg(); |
| 30 | 30 | } else { |
| 31 | - $error_message = 'Syntax error'; |
|
| 31 | + $error_message = 'Syntax error'; |
|
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | if (json_last_error() !== JSON_ERROR_NONE) { |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | if ($extension === 'dist') { |
| 64 | 64 | $extension = array_pop($parts); |
| 65 | 65 | } |
| 66 | - $parser = $this->getParser($extension); |
|
| 66 | + $parser = $this->getParser($extension); |
|
| 67 | 67 | |
| 68 | 68 | // Try and load file |
| 69 | 69 | $this->data = array_replace_recursive($this->data, (array) $parser->parse($path)); |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | if (true === is_array($value)) { |
| 87 | 87 | $this->replaceParameters($value, $parameters); |
| 88 | 88 | } elseif (true === is_string($value)) { |
| 89 | - $value = preg_replace_callback('/%([^%]+)%/', function ($m) use ($parameters) { |
|
| 89 | + $value = preg_replace_callback('/%([^%]+)%/', function($m) use ($parameters) { |
|
| 90 | 90 | if (null === $parameterValue = $parameters->get($m[1])) { |
| 91 | 91 | return $m[0]; |
| 92 | 92 | } |
@@ -185,7 +185,7 @@ discard block |
||
| 185 | 185 | |
| 186 | 186 | // If `$path` is a directory |
| 187 | 187 | if (is_dir($path)) { |
| 188 | - $paths = glob($path . '/*.*'); |
|
| 188 | + $paths = glob($path.'/*.*'); |
|
| 189 | 189 | if (empty($paths)) { |
| 190 | 190 | throw new EmptyDirectoryException("Configuration directory: [$path] is empty"); |
| 191 | 191 | } |