Skip to content

Commit 8815fd6

Browse files
committed
#35706 Remote storage issue #35706
- Added copyright and strict type setting - Added type name for method
1 parent bb3d158 commit 8815fd6

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

lib/internal/Magento/Framework/File/Pdf/Image.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
declare(strict_types=1);
27

38
namespace Magento\Framework\File\Pdf;
49

@@ -28,7 +33,7 @@ public function __construct(ImageFactory $imageFactory)
2833
* @throws \Magento\Framework\Exception\FileSystemException
2934
* @throws \Zend_Pdf_Exception
3035
*/
31-
public function imageWithPathAdvanced($filePath)
36+
public function imageWithPathAdvanced(string $filePath)
3237
{
3338
return $this->imageFactory->factory($filePath);
3439
}

lib/internal/Magento/Framework/File/Pdf/ImageResource/ImageFactory.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function __construct(Filesystem $filesystem)
3939
* @throws \Zend_Pdf_Exception
4040
* @SuppressWarnings(PHPMD.LongVariable)
4141
*/
42-
public function factory($filename)
42+
public function factory(string $filename)
4343
{
4444
$mediaReader = $this->filesystem->getDirectoryRead(DirectoryList::MEDIA);
4545
if (!$mediaReader->isFile($filename)) {
@@ -158,7 +158,7 @@ protected function fetchFallbackMimeType(string $baseFileName): string
158158
* @param string $tempResourceFilePath
159159
* @return \Zend_Pdf_Resource_Image_Jpeg|\Zend_Pdf_Resource_Image_Png|\Zend_Pdf_Resource_Image_Tiff|object
160160
*/
161-
protected function getZendPdfImage($typeOfImage, $tempResourceFilePath)
161+
protected function getZendPdfImage(string $typeOfImage, string $tempResourceFilePath)
162162
{
163163
$classToUseAsPdfImage = sprintf('Zend_Pdf_Resource_Image_%s', ucfirst($typeOfImage));
164164
return new $classToUseAsPdfImage($tempResourceFilePath);

0 commit comments

Comments
 (0)