@@ -157,17 +157,14 @@ |
||
| 157 | 157 | if (is_file($absolutePath)) |
| 158 | 158 | { |
| 159 | 159 | $object->type = static::TYPE_FILE; |
| 160 | - } |
|
| 161 | - elseif (is_dir($absolutePath)) |
|
| 160 | + } elseif (is_dir($absolutePath)) |
|
| 162 | 161 | { |
| 163 | 162 | $object->type = static::TYPE_DIR; |
| 164 | - } |
|
| 165 | - elseif (is_link($absolutePath)) |
|
| 163 | + } elseif (is_link($absolutePath)) |
|
| 166 | 164 | { |
| 167 | 165 | $object->type = static::TYPE_LINK; |
| 168 | 166 | $object->linkTarget = str_replace($basePath, '', readlink($absolutePath)); |
| 169 | - } |
|
| 170 | - else |
|
| 167 | + } else |
|
| 171 | 168 | { |
| 172 | 169 | throw new Exception(sprintf('File %s does not exist!', $absolutePath)); |
| 173 | 170 | } |
@@ -38,8 +38,7 @@ |
||
| 38 | 38 | if ($parent === null) |
| 39 | 39 | { |
| 40 | 40 | throw new Exception(); |
| 41 | - } |
|
| 42 | - elseif (!$parent->isDirectory()) |
|
| 41 | + } elseif (!$parent->isDirectory()) |
|
| 43 | 42 | { |
| 44 | 43 | throw new Exception(); |
| 45 | 44 | } |