Skip to content

Commit d346255

Browse files
committed
Code typo
1 parent c9ef975 commit d346255

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

lib/Phpfastcache/Util/Directory.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class Directory
2626
* Get the directory size
2727
* @param string $directory
2828
* @param bool $includeDirAllocSize
29-
* @return integer
29+
* @return int
3030
*/
3131
public static function dirSize(string $directory, bool $includeDirAllocSize = false): int
3232
{
@@ -37,10 +37,8 @@ public static function dirSize(string $directory, bool $includeDirAllocSize = fa
3737
*/
3838
if ($file->isFile()) {
3939
$size += filesize($file->getRealPath());
40-
} else {
41-
if ($includeDirAllocSize) {
42-
$size += $file->getSize();
43-
}
40+
} elseif ($includeDirAllocSize) {
41+
$size += $file->getSize();
4442
}
4543
}
4644

0 commit comments

Comments
 (0)