Skip to content

Commit a0998fe

Browse files
committed
Fix code format
1 parent 48262c9 commit a0998fe

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

lib/internal/Magento/Framework/Filesystem/Driver/File.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
/**
1717
* Filesystem driver that uses the local filesystem.
18+
*
1819
* Assumed that stat cache is cleanup before test filesystem
1920
*
2021
* @SuppressWarnings(PHPMD.ExcessiveClassComplexity)

lib/internal/Magento/Framework/Filesystem/Driver/StatefulFile.php

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ public function deleteDirectory($path)
454454
public function changePermissions($path, $permissions)
455455
{
456456
$result = @chmod($this->getScheme() . $path, $permissions);
457-
clearstatcache(true, $this->getScheme() . $path);
457+
clearstatcache(false, $this->getScheme() . $path);
458458
if (!$result) {
459459
throw new FileSystemException(
460460
new Phrase(
@@ -483,7 +483,7 @@ public function changePermissionsRecursively($path, $dirPermissions, $filePermis
483483
} else {
484484
$result = @chmod($path, $dirPermissions);
485485
}
486-
clearstatcache(true, $this->getScheme() . $path);
486+
clearstatcache(false, $this->getScheme() . $path);
487487

488488
if (!$result) {
489489
throw new FileSystemException(
@@ -601,12 +601,9 @@ public function fileOpen($path, $mode)
601601
*/
602602
public function fileReadLine($resource, $length, $ending = null)
603603
{
604-
try {
604+
// phpcs:disable
605605
$result = @stream_get_line($resource, $length, $ending);
606-
} catch (\Exception $e) {
607-
$result = false;
608-
}
609-
606+
// phpcs:enable
610607
if (false === $result) {
611608
throw new FileSystemException(
612609
new Phrase('File cannot be read %1', [$this->getWarningMessage()])

0 commit comments

Comments
 (0)