| @@ -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 | } | 
| @@ -2,10 +2,9 @@ | ||
| 2 | 2 | |
| 3 | 3 | namespace Noodlehaus; | 
| 4 | 4 | |
| 5 | +use Noodlehaus\Exception\EmptyDirectoryException; | |
| 5 | 6 | use Noodlehaus\Exception\FileNotFoundException; | 
| 6 | 7 | use Noodlehaus\Exception\UnsupportedFormatException; | 
| 7 | -use Noodlehaus\Exception\EmptyDirectoryException; | |
| 8 | -use InvalidArgumentException; | |
| 9 | 8 | use Noodlehaus\Parser\ParserInterface; | 
| 10 | 9 | use Noodlehaus\Writer\WriterInterface; | 
| 11 | 10 | |
| @@ -37,7 +37,7 @@ discard block | ||
| 37 | 37 | ); | 
| 38 | 38 | } | 
| 39 | 39 | |
| 40 | - return (array)$this->parse($data); | |
| 40 | + return (array) $this->parse($data); | |
| 41 | 41 | } | 
| 42 | 42 | |
| 43 | 43 | /** | 
| @@ -59,7 +59,7 @@ discard block | ||
| 59 | 59 | ); | 
| 60 | 60 | } | 
| 61 | 61 | |
| 62 | - return (array)$this->parse($data); | |
| 62 | + return (array) $this->parse($data); | |
| 63 | 63 | } | 
| 64 | 64 | |
| 65 | 65 | /** | 
| @@ -40,7 +40,7 @@ discard block | ||
| 40 | 40 | } | 
| 41 | 41 | |
| 42 | 42 | // Complete parsing | 
| 43 | - return (array)$this->parse($data, $filename); | |
| 43 | + return (array) $this->parse($data, $filename); | |
| 44 | 44 | } | 
| 45 | 45 | |
| 46 | 46 | /** | 
| @@ -55,7 +55,7 @@ discard block | ||
| 55 | 55 | // Handle PHP start tag | 
| 56 | 56 | $config = trim($config); | 
| 57 | 57 |          if (substr($config, 0, 2) === '<?') { | 
| 58 | - $config = '?>' . $config; | |
| 58 | + $config = '?>'.$config; | |
| 59 | 59 | } | 
| 60 | 60 | |
| 61 | 61 | // Eval the string, if it throws an exception, rethrow it | 
| @@ -71,7 +71,7 @@ discard block | ||
| 71 | 71 | } | 
| 72 | 72 | |
| 73 | 73 | // Complete parsing | 
| 74 | - return (array)$this->parse($data); | |
| 74 | + return (array) $this->parse($data); | |
| 75 | 75 | } | 
| 76 | 76 | |
| 77 | 77 | /** | 
| @@ -26,7 +26,7 @@ discard block | ||
| 26 | 26 |      { | 
| 27 | 27 | $data = json_decode(file_get_contents($filename), true); | 
| 28 | 28 | |
| 29 | - return (array)$this->parse($data, $filename); | |
| 29 | + return (array) $this->parse($data, $filename); | |
| 30 | 30 | } | 
| 31 | 31 | |
| 32 | 32 | /** | 
| @@ -39,7 +39,7 @@ discard block | ||
| 39 | 39 |      { | 
| 40 | 40 | $data = json_decode($config, true); | 
| 41 | 41 | |
| 42 | - return (array)$this->parse($data); | |
| 42 | + return (array) $this->parse($data); | |
| 43 | 43 | } | 
| 44 | 44 | |
| 45 | 45 | /** | 
| @@ -54,7 +54,7 @@ discard block | ||
| 54 | 54 | protected function parse($data = null, $filename = null) | 
| 55 | 55 |      { | 
| 56 | 56 |          if (json_last_error() !== JSON_ERROR_NONE) { | 
| 57 | - $error_message = 'Syntax error'; | |
| 57 | + $error_message = 'Syntax error'; | |
| 58 | 58 |              if (function_exists('json_last_error_msg')) { | 
| 59 | 59 | $error_message = json_last_error_msg(); | 
| 60 | 60 | } | 
| @@ -27,7 +27,7 @@ discard block | ||
| 27 | 27 | libxml_use_internal_errors(true); | 
| 28 | 28 | $data = simplexml_load_file($filename, null, LIBXML_NOERROR); | 
| 29 | 29 | |
| 30 | - return (array)$this->parse($data, $filename); | |
| 30 | + return (array) $this->parse($data, $filename); | |
| 31 | 31 | } | 
| 32 | 32 | |
| 33 | 33 | /** | 
| @@ -40,7 +40,7 @@ discard block | ||
| 40 | 40 |      { | 
| 41 | 41 | libxml_use_internal_errors(true); | 
| 42 | 42 | $data = simplexml_load_string($config, null, LIBXML_NOERROR); | 
| 43 | - return (array)$this->parse($data); | |
| 43 | + return (array) $this->parse($data); | |
| 44 | 44 | } | 
| 45 | 45 | |
| 46 | 46 | /** |