Skip to content

Commit 5523461

Browse files
authored
magento-engcom/magento2ce#2809: Suppressed static test failures
1 parent 1b39eb3 commit 5523461

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ public function addImage(
157157
throw new LocalizedException(__("The image doesn't exist."));
158158
}
159159

160+
// phpcs:ignore Magento2.Functions.DiscouragedFunction
160161
$pathinfo = pathinfo($file);
161162
$imgExtensions = ['jpg', 'jpeg', 'gif', 'png'];
162163
if (!isset($pathinfo['extension']) || !in_array(strtolower($pathinfo['extension']), $imgExtensions)) {
@@ -452,6 +453,7 @@ protected function getUniqueFileName($file, $forTmp = false)
452453
$destinationFile = $forTmp
453454
? $this->mediaDirectory->getAbsolutePath($this->mediaConfig->getTmpMediaPath($file))
454455
: $this->mediaDirectory->getAbsolutePath($this->mediaConfig->getMediaPath($file));
456+
// phpcs:ignore Magento2.Functions.DiscouragedFunction
455457
$destFile = dirname($file) . '/'
456458
. \Magento\MediaStorage\Model\File\Uploader::getNewFileName($destinationFile);
457459
}

0 commit comments

Comments
 (0)