Skip to content

Commit 41dad46

Browse files
authored
ENGCOM-4670: Small PHPDocs fixes #20295
2 parents a101bc5 + e129a8a commit 41dad46

File tree

5 files changed

+14
-17
lines changed

5 files changed

+14
-17
lines changed

app/code/Magento/Theme/Controller/Adminhtml/System/Design/Theme/UploadJs.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,21 @@
44
* Copyright © Magento, Inc. All rights reserved.
55
* See COPYING.txt for license details.
66
*/
7+
78
namespace Magento\Theme\Controller\Adminhtml\System\Design\Theme;
89

10+
use Magento\Framework\App\Action\HttpGetActionInterface;
11+
912
/**
1013
* Class UploadJs
1114
* @deprecated
1215
*/
13-
class UploadJs extends \Magento\Theme\Controller\Adminhtml\System\Design\Theme
16+
class UploadJs extends \Magento\Theme\Controller\Adminhtml\System\Design\Theme implements HttpGetActionInterface
1417
{
1518
/**
1619
* Upload js file
1720
*
1821
* @return void
19-
* @throws \Magento\Framework\Exception\LocalizedException
2022
*/
2123
public function execute()
2224
{
@@ -50,6 +52,7 @@ public function execute()
5052
\Magento\Framework\View\Design\Theme\Customization\File\Js::TYPE
5153
);
5254
$result = ['error' => false, 'files' => $customization->generateFileInfo($customJsFiles)];
55+
// phpcs:disable Magento2.Exceptions.ThrowCatch
5356
} catch (\Magento\Framework\Exception\LocalizedException $e) {
5457
$result = ['error' => true, 'message' => $e->getMessage()];
5558
} catch (\Exception $e) {

app/code/Magento/Theme/Model/Design/Backend/File.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
67
namespace Magento\Theme\Model\Design\Backend;
78

89
use Magento\Config\Model\Config\Backend\File\RequestData\RequestDataInterface;
@@ -109,10 +110,7 @@ public function beforeSave()
109110
}
110111

111112
/**
112-
* After Load
113-
*
114-
* @return File
115-
* @throws LocalizedException
113+
* @inheritDoc
116114
*/
117115
public function afterLoad()
118116
{

app/code/Magento/Theme/Model/Design/Config/FileUploader/FileProcessor.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
use Magento\Store\Model\StoreManagerInterface;
1919

2020
/**
21+
* Design file processor.
22+
*
2123
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
2224
*/
2325
class FileProcessor
@@ -79,8 +81,8 @@ public function __construct(
7981
* Save file to temp media directory
8082
*
8183
* @param string $fileId
84+
*
8285
* @return array
83-
* @throws LocalizedException
8486
*/
8587
public function saveToTmp($fileId)
8688
{

app/code/Magento/Theme/Model/ResourceModel/Design.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ protected function _construct()
4646
* Perform actions before object save
4747
*
4848
* @param \Magento\Framework\Model\AbstractModel $object
49-
* @return $this
49+
* @return void
5050
* @throws \Magento\Framework\Exception\LocalizedException
5151
*/
5252
public function _beforeSave(\Magento\Framework\Model\AbstractModel $object)
@@ -152,7 +152,6 @@ protected function _checkIntersection($storeId, $dateFrom, $dateTo, $currentId)
152152
$dateConditions = [];
153153
}
154154

155-
$condition = '';
156155
if (!empty($dateConditions)) {
157156
$condition = '(' . implode(') OR (', $dateConditions) . ')';
158157
$select->where($condition);

app/code/Magento/Theme/Model/Wysiwyg/Storage.php

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,12 @@
44
* See COPYING.txt for license details.
55
*/
66

7-
/**
8-
* Theme wysiwyg storage model
9-
*/
107
namespace Magento\Theme\Model\Wysiwyg;
118

129
use Magento\Framework\App\Filesystem\DirectoryList;
1310

1411
/**
15-
* Class Storage
16-
*
17-
* @package Magento\Theme\Model\Wysiwyg
12+
* Theme wysiwyg storage model
1813
*/
1914
class Storage
2015
{
@@ -110,7 +105,7 @@ public function __construct(
110105
* Upload file
111106
*
112107
* @param string $targetPath
113-
* @return bool
108+
* @return array
114109
* @throws \Magento\Framework\Exception\LocalizedException
115110
*/
116111
public function uploadFile($targetPath)
@@ -271,7 +266,7 @@ public function getFilesCollection()
271266
if (self::TYPE_IMAGE == $storageType) {
272267
$requestParams['file'] = $fileName;
273268
$file['thumbnailParams'] = $requestParams;
274-
269+
//phpcs:ignore Generic.PHP.NoSilencedErrors
275270
$size = @getimagesize($path);
276271
if (is_array($size)) {
277272
$file['width'] = $size[0];

0 commit comments

Comments
 (0)