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 1313 */
1414class ValidateFactory
1515{
16+ /**
17+ * @var ObjectManagerInterface
18+ */
1619 private ObjectManagerInterface $ objectManager ;
1720
1821 /**
@@ -26,7 +29,7 @@ public function __construct(ObjectManagerInterface $objectManager)
2629 /**
2730 * Main factory method
2831 *
29- * @return \Zend_Validate
32+ * @return ExistingValidate
3033 */
3134 public function create ()
3235 {
Original file line number Diff line number Diff line change @@ -133,6 +133,8 @@ protected function parseExtensionsString($extensions)
133133 }
134134
135135 /**
136+ * Adds required validators to th $object
137+ *
136138 * @param \Zend_File_Transfer_Adapter_Http|\Zend_Validate $object
137139 * @param \Magento\Catalog\Model\Product\Option $option
138140 * @param array $fileFullPath
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ public function __construct(
7171 * Copies file from the remote server to the tmp directory
7272 *
7373 * @param Subject $subject
74- * @param $value
74+ * @param string $value
7575 * @param string|null $originalName
7676 * @return array
7777 * @throws FileSystemException
@@ -116,6 +116,7 @@ private function copyFileToTmp(string $filePath): string
116116 $ absolutePath = $ this ->remoteDirectoryWrite ->getAbsolutePath ($ filePath );
117117 if ($ this ->remoteDirectoryWrite ->isFile ($ absolutePath )) {
118118 $ this ->tmpDirectoryWrite ->create ();
119+ // phpcs:ignore Magento2.Functions.DiscouragedFunction
119120 $ tmpPath = $ this ->tmpDirectoryWrite ->getAbsolutePath () . basename ($ filePath );
120121 $ content = $ this ->remoteDirectoryWrite ->getDriver ()->fileGetContents ($ filePath );
121122 if ($ this ->tmpDirectoryWrite ->getDriver ()->filePutContents ($ tmpPath , $ content ) >= 0 ) {
You can’t perform that action at this time.
0 commit comments