File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
lib/internal/Magento/Framework/File/Pdf Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 1
1
<?php
2
+ /**
3
+ * Copyright © Magento, Inc. All rights reserved.
4
+ * See COPYING.txt for license details.
5
+ */
6
+ declare (strict_types=1 );
2
7
3
8
namespace Magento \Framework \File \Pdf ;
4
9
@@ -28,7 +33,7 @@ public function __construct(ImageFactory $imageFactory)
28
33
* @throws \Magento\Framework\Exception\FileSystemException
29
34
* @throws \Zend_Pdf_Exception
30
35
*/
31
- public function imageWithPathAdvanced ($ filePath )
36
+ public function imageWithPathAdvanced (string $ filePath )
32
37
{
33
38
return $ this ->imageFactory ->factory ($ filePath );
34
39
}
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ public function __construct(Filesystem $filesystem)
39
39
* @throws \Zend_Pdf_Exception
40
40
* @SuppressWarnings(PHPMD.LongVariable)
41
41
*/
42
- public function factory ($ filename )
42
+ public function factory (string $ filename )
43
43
{
44
44
$ mediaReader = $ this ->filesystem ->getDirectoryRead (DirectoryList::MEDIA );
45
45
if (!$ mediaReader ->isFile ($ filename )) {
@@ -158,7 +158,7 @@ protected function fetchFallbackMimeType(string $baseFileName): string
158
158
* @param string $tempResourceFilePath
159
159
* @return \Zend_Pdf_Resource_Image_Jpeg|\Zend_Pdf_Resource_Image_Png|\Zend_Pdf_Resource_Image_Tiff|object
160
160
*/
161
- protected function getZendPdfImage ($ typeOfImage , $ tempResourceFilePath )
161
+ protected function getZendPdfImage (string $ typeOfImage , string $ tempResourceFilePath )
162
162
{
163
163
$ classToUseAsPdfImage = sprintf ('Zend_Pdf_Resource_Image_%s ' , ucfirst ($ typeOfImage ));
164
164
return new $ classToUseAsPdfImage ($ tempResourceFilePath );
You can’t perform that action at this time.
0 commit comments