Skip to content

Commit 1b8a371

Browse files
committed
Static test fix
1 parent 341b54b commit 1b8a371

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

app/code/Magento/Cms/Controller/Adminhtml/Wysiwyg/Images/DeleteFiles.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
*/
66
namespace Magento\Cms\Controller\Adminhtml\Wysiwyg\Images;
77

8-
use Magento\Framework\App\Filesystem\DirectoryList;
98
use Magento\Framework\App\Action\HttpPostActionInterface;
9+
use Magento\Framework\App\Filesystem\DirectoryList;
1010

1111
/**
1212
* Delete image files.
@@ -62,6 +62,7 @@ public function execute()
6262
{
6363
try {
6464
if (!$this->getRequest()->isPost()) {
65+
//phpcs:ignore Magento2.Exceptions.DirectThrow
6566
throw new \Exception('Wrong request.');
6667
}
6768
$files = $this->getRequest()->getParam('files');
@@ -84,8 +85,9 @@ public function execute()
8485
$this->getStorage()->deleteFile($filePath);
8586
}
8687
}
87-
88+
8889
return $this->resultRawFactory->create();
90+
// phpcs:ignore Magento2.Exceptions.ThrowCatch
8991
} catch (\Exception $e) {
9092
$result = ['error' => true, 'message' => $e->getMessage()];
9193
/** @var \Magento\Framework\Controller\Result\Json $resultJson */

0 commit comments

Comments
 (0)