Skip to content

Commit cc0234b

Browse files
ENGCOM-4194: Fixing returning types #21095
- Merge Pull Request #21095 from eduard13/magento2:2.3-develop-fix-returning-type - Merged commits: 1. b9421d0 2. 7db162a 3. 9b1d046
2 parents 49a25f2 + 9b1d046 commit cc0234b

File tree

5 files changed

+31
-11
lines changed

5 files changed

+31
-11
lines changed

app/code/Magento/Backend/Block/Template/Context.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
* the classes they were introduced for.
1818
*
1919
* @api
20+
* @SuppressWarnings(PHPMD.CookieAndSessionMisuse)
2021
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
2122
* @since 100.0.2
2223
*/
@@ -173,6 +174,8 @@ public function getAuthorization()
173174
}
174175

175176
/**
177+
* Get Backend Session
178+
*
176179
* @return \Magento\Backend\Model\Session
177180
*/
178181
public function getBackendSession()
@@ -181,6 +184,8 @@ public function getBackendSession()
181184
}
182185

183186
/**
187+
* Get Math Random
188+
*
184189
* @return \Magento\Framework\Math\Random
185190
*/
186191
public function getMathRandom()
@@ -189,6 +194,8 @@ public function getMathRandom()
189194
}
190195

191196
/**
197+
* Get Form Key
198+
*
192199
* @return \Magento\Framework\Data\Form\FormKey
193200
*/
194201
public function getFormKey()
@@ -197,7 +204,9 @@ public function getFormKey()
197204
}
198205

199206
/**
200-
* @return \Magento\Framework\Data\Form\FormKey
207+
* Get Class Name Builder
208+
*
209+
* @return \Magento\Framework\Code\NameBuilder
201210
*/
202211
public function getNameBuilder()
203212
{

app/code/Magento/Backup/Model/Backup.php

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
* @method string getPath()
1515
* @method string getName()
1616
* @method string getTime()
17+
* @SuppressWarnings(PHPMD.CookieAndSessionMisuse)
1718
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
1819
* @api
1920
* @since 100.0.2
@@ -80,6 +81,7 @@ class Backup extends \Magento\Framework\DataObject implements \Magento\Framework
8081
* @param \Magento\Framework\Encryption\EncryptorInterface $encryptor
8182
* @param \Magento\Framework\Filesystem $filesystem
8283
* @param array $data
84+
* @throws \Magento\Framework\Exception\FileSystemException
8385
*/
8486
public function __construct(
8587
\Magento\Backup\Helper\Data $helper,
@@ -242,7 +244,7 @@ public function setFile(&$content)
242244
/**
243245
* Return content of backup file
244246
*
245-
* @return string
247+
* @return array
246248
* @throws \Magento\Framework\Exception\LocalizedException
247249
*/
248250
public function &getFile()
@@ -275,8 +277,9 @@ public function deleteFile()
275277
*
276278
* @param bool $write
277279
* @return $this
278-
* @throws \Magento\Framework\Exception\InputException
279280
* @throws \Magento\Framework\Backup\Exception\NotEnoughPermissions
281+
* @throws \Magento\Framework\Exception\FileSystemException
282+
* @throws \Magento\Framework\Exception\InputException
280283
*/
281284
public function open($write = false)
282285
{
@@ -330,6 +333,7 @@ protected function _getStream()
330333
*
331334
* @param int $length
332335
* @return string
336+
* @throws \Magento\Framework\Exception\InputException
333337
*/
334338
public function read($length)
335339
{
@@ -340,6 +344,7 @@ public function read($length)
340344
* Check end of file.
341345
*
342346
* @return bool
347+
* @throws \Magento\Framework\Exception\InputException
343348
*/
344349
public function eof()
345350
{
@@ -370,6 +375,7 @@ public function write($string)
370375
* Close open backup file
371376
*
372377
* @return $this
378+
* @throws \Magento\Framework\Exception\InputException
373379
*/
374380
public function close()
375381
{
@@ -383,6 +389,8 @@ public function close()
383389
* Print output
384390
*
385391
* @return string
392+
* @return \Magento\Framework\Filesystem\Directory\ReadInterface|string|void
393+
* @throws \Magento\Framework\Exception\FileSystemException
386394
*/
387395
public function output()
388396
{
@@ -398,6 +406,8 @@ public function output()
398406
}
399407

400408
/**
409+
* Get Size
410+
*
401411
* @return int|mixed
402412
*/
403413
public function getSize()
@@ -419,6 +429,7 @@ public function getSize()
419429
*
420430
* @param string $password
421431
* @return bool
432+
* @throws \Exception
422433
*/
423434
public function validateUserPassword($password)
424435
{

app/code/Magento/Ui/Component/Wysiwyg/Config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class Config implements ConfigInterface
1313
/**
1414
* Return WYSIWYG configuration
1515
*
16-
* @return \Magento\Framework\DataObject
16+
* @return array
1717
*/
1818
public function getConfig()
1919
{

app/code/Magento/Widget/Block/Adminhtml/Widget/Catalog/Category/Chooser.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,19 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
namespace Magento\Widget\Block\Adminhtml\Widget\Catalog\Category;
67

78
/**
89
* Category chooser for widget's layout updates
9-
*
10-
* @author Magento Core Team <core@magentocommerce.com>
1110
*/
12-
namespace Magento\Widget\Block\Adminhtml\Widget\Catalog\Category;
13-
1411
class Chooser extends \Magento\Catalog\Block\Adminhtml\Category\Widget\Chooser
1512
{
1613
/**
1714
* Get JSON of a tree node or an associative array
1815
*
1916
* @param \Magento\Framework\Data\Tree\Node|array $node
2017
* @param int $level
21-
* @return string
18+
* @return array
2219
*/
2320
protected function _getNodeJson($node, $level = 0)
2421
{

lib/internal/Magento/Framework/Code/NameBuilder.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
<?php
22
/**
3-
* Name builder
4-
*
53
* Copyright © Magento, Inc. All rights reserved.
64
* See COPYING.txt for license details.
75
*/
86
namespace Magento\Framework\Code;
97

8+
/**
9+
* Name builder.
10+
*
11+
* @api
12+
*/
1013
class NameBuilder
1114
{
1215
/**

0 commit comments

Comments
 (0)