@@ -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 |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | $data = json_decode(file_get_contents($path), true); |
| 27 | 27 | |
| 28 | 28 | if (json_last_error() !== JSON_ERROR_NONE) { |
| 29 | - $error_message = 'Syntax error'; |
|
| 29 | + $error_message = 'Syntax error'; |
|
| 30 | 30 | if (function_exists('json_last_error_msg')) { |
| 31 | 31 | $error_message = json_last_error_msg(); |
| 32 | 32 | } |
@@ -2,10 +2,10 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Noodlehaus; |
| 4 | 4 | |
| 5 | +use InvalidArgumentException; |
|
| 6 | +use Noodlehaus\Exception\EmptyDirectoryException; |
|
| 5 | 7 | use Noodlehaus\Exception\FileNotFoundException; |
| 6 | 8 | use Noodlehaus\Exception\UnsupportedFormatException; |
| 7 | -use Noodlehaus\Exception\EmptyDirectoryException; |
|
| 8 | -use InvalidArgumentException; |
|
| 9 | 9 | use Noodlehaus\FileParser\FileParserInterface; |
| 10 | 10 | use Noodlehaus\StringParser\StringParserInterface; |
| 11 | 11 | |
@@ -214,7 +214,7 @@ |
||
| 214 | 214 | |
| 215 | 215 | // If `$path` is a directory |
| 216 | 216 | if (is_dir($path)) { |
| 217 | - $paths = glob($path . '/*.*'); |
|
| 217 | + $paths = glob($path.'/*.*'); |
|
| 218 | 218 | if (empty($paths)) { |
| 219 | 219 | throw new EmptyDirectoryException("Configuration directory: [$path] is empty"); |
| 220 | 220 | } |
@@ -3,8 +3,8 @@ |
||
| 3 | 3 | namespace Noodlehaus\StringParser; |
| 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 string parser |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | $data = json_decode($configuration, true); |
| 27 | 27 | |
| 28 | 28 | if (json_last_error() !== JSON_ERROR_NONE) { |
| 29 | - $error_message = 'Syntax error'; |
|
| 29 | + $error_message = 'Syntax error'; |
|
| 30 | 30 | if (function_exists('json_last_error_msg')) { |
| 31 | 31 | $error_message = json_last_error_msg(); |
| 32 | 32 | } |