File tree Expand file tree Collapse file tree 3 files changed +8
-2
lines changed
Catalog/Model/Product/Option/Type/File Expand file tree Collapse file tree 3 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 13
13
*/
14
14
class ValidateFactory
15
15
{
16
+ /**
17
+ * @var ObjectManagerInterface
18
+ */
16
19
private ObjectManagerInterface $ objectManager ;
17
20
18
21
/**
@@ -26,7 +29,7 @@ public function __construct(ObjectManagerInterface $objectManager)
26
29
/**
27
30
* Main factory method
28
31
*
29
- * @return \Zend_Validate
32
+ * @return ExistingValidate
30
33
*/
31
34
public function create ()
32
35
{
Original file line number Diff line number Diff line change @@ -133,6 +133,8 @@ protected function parseExtensionsString($extensions)
133
133
}
134
134
135
135
/**
136
+ * Adds required validators to th $object
137
+ *
136
138
* @param \Zend_File_Transfer_Adapter_Http|\Zend_Validate $object
137
139
* @param \Magento\Catalog\Model\Product\Option $option
138
140
* @param array $fileFullPath
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ public function __construct(
71
71
* Copies file from the remote server to the tmp directory
72
72
*
73
73
* @param Subject $subject
74
- * @param $value
74
+ * @param string $value
75
75
* @param string|null $originalName
76
76
* @return array
77
77
* @throws FileSystemException
@@ -116,6 +116,7 @@ private function copyFileToTmp(string $filePath): string
116
116
$ absolutePath = $ this ->remoteDirectoryWrite ->getAbsolutePath ($ filePath );
117
117
if ($ this ->remoteDirectoryWrite ->isFile ($ absolutePath )) {
118
118
$ this ->tmpDirectoryWrite ->create ();
119
+ // phpcs:ignore Magento2.Functions.DiscouragedFunction
119
120
$ tmpPath = $ this ->tmpDirectoryWrite ->getAbsolutePath () . basename ($ filePath );
120
121
$ content = $ this ->remoteDirectoryWrite ->getDriver ()->fileGetContents ($ filePath );
121
122
if ($ this ->tmpDirectoryWrite ->getDriver ()->filePutContents ($ tmpPath , $ content ) >= 0 ) {
You can’t perform that action at this time.
0 commit comments