Skip to content

Commit 651f1d9

Browse files
committed
Fix static tests.
1 parent 09b35a2 commit 651f1d9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

app/code/Magento/Catalog/Model/Product/Gallery/CreateHandler.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,7 @@ protected function copyImage($file)
420420
$destinationFile = $this->getUniqueFileName($file);
421421

422422
if (!$this->mediaDirectory->isFile($this->mediaConfig->getMediaPath($file))) {
423+
// phpcs:ignore Magento2.Exceptions.DirectThrow
423424
throw new \Exception();
424425
}
425426

@@ -437,6 +438,7 @@ protected function copyImage($file)
437438
}
438439

439440
return str_replace('\\', '/', $destinationFile);
441+
// phpcs:ignore Magento2.Exceptions.ThrowCatch
440442
} catch (\Exception $e) {
441443
$file = $this->mediaConfig->getMediaPath($file);
442444
throw new \Magento\Framework\Exception\LocalizedException(

0 commit comments

Comments
 (0)