@@ -232,17 +232,14 @@ |
||
| 232 | 232 | { |
| 233 | 233 | $object->type = static::TYPE_LINK; |
| 234 | 234 | $object->linkTarget = str_replace("{$basePath}/", '', readlink($absolutePath)); |
| 235 | - } |
|
| 236 | - elseif (is_file($absolutePath)) |
|
| 235 | + } elseif (is_file($absolutePath)) |
|
| 237 | 236 | { |
| 238 | 237 | $object->type = static::TYPE_FILE; |
| 239 | 238 | $object->size = (int)$stat['size']; |
| 240 | - } |
|
| 241 | - elseif (is_dir($absolutePath)) |
|
| 239 | + } elseif (is_dir($absolutePath)) |
|
| 242 | 240 | { |
| 243 | 241 | $object->type = static::TYPE_DIR; |
| 244 | - } |
|
| 245 | - else |
|
| 242 | + } else |
|
| 246 | 243 | { |
| 247 | 244 | throw new \LogicException(); |
| 248 | 245 | } |
@@ -17,12 +17,10 @@ |
||
| 17 | 17 | if (!file_exists($path)) |
| 18 | 18 | { |
| 19 | 19 | throw new \InvalidArgumentException("Given path '{$path}' does not exist."); |
| 20 | - } |
|
| 21 | - elseif (!is_dir($path)) |
|
| 20 | + } elseif (!is_dir($path)) |
|
| 22 | 21 | { |
| 23 | 22 | throw new \InvalidArgumentException("Given path '{$path}' is not a directory."); |
| 24 | - } |
|
| 25 | - elseif (!is_readable($path)) |
|
| 23 | + } elseif (!is_readable($path)) |
|
| 26 | 24 | { |
| 27 | 25 | throw new \InvalidArgumentException("Given directory '{$path}' is not readable.'"); |
| 28 | 26 | } |