Skip to content

Commit cf2b81a

Browse files
committed
Fixed Static Tests
1 parent ad3e3cb commit cf2b81a

File tree

6 files changed

+10
-18
lines changed

6 files changed

+10
-18
lines changed

app/code/Magento/Catalog/Helper/Product/View.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,29 +26,21 @@ class View extends \Magento\Framework\App\Helper\AbstractHelper
2626
protected $messageGroups;
2727

2828
/**
29-
* Core registry
30-
*
3129
* @var \Magento\Framework\Registry
3230
*/
3331
protected $_coreRegistry = null;
3432

3533
/**
36-
* Catalog product
37-
*
3834
* @var \Magento\Catalog\Helper\Product
3935
*/
4036
protected $_catalogProduct = null;
4137

4238
/**
43-
* Catalog design
44-
*
4539
* @var \Magento\Catalog\Model\Design
4640
*/
4741
protected $_catalogDesign;
4842

4943
/**
50-
* Catalog session
51-
*
5244
* @var \Magento\Catalog\Model\Session
5345
*/
5446
protected $_catalogSession;

app/code/Magento/ReleaseNotification/Model/Condition/CanViewNotification.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
/**
1515
* Dynamic validator for UI release notification, manage UI component visibility.
1616
* Return true if the logged in user has not seen the notification.
17+
* @SuppressWarnings(PHPMD.CookieAndSessionMisuse)
1718
*/
1819
class CanViewNotification implements VisibilityConditionInterface
1920
{
@@ -72,8 +73,6 @@ public function __construct(
7273
}
7374

7475
/**
75-
* Validate if notification popup can be shown and set the notification flag
76-
*
7776
* @inheritdoc
7877
*/
7978
public function isVisible(array $arguments)

app/code/Magento/Sales/Helper/Guest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020
class Guest extends \Magento\Framework\App\Helper\AbstractHelper
2121
{
2222
/**
23-
* Core registry
24-
*
2523
* @var \Magento\Framework\Registry
2624
*/
2725
protected $coreRegistry;

lib/internal/Magento/Framework/DB/Helper/AbstractHelper.php

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

8+
/**
9+
* Abstract DB helper class.
10+
*/
1011
abstract class AbstractHelper
1112
{
1213
/**
@@ -100,6 +101,7 @@ public function escapeLikeValue($value, $options = [])
100101

101102
/**
102103
* Escapes, quotes and adds escape symbol to LIKE expression.
104+
*
103105
* For options and escaping see escapeLikeValue().
104106
*
105107
* @param string $value
@@ -112,6 +114,7 @@ abstract public function addLikeEscape($value, $options = []);
112114

113115
/**
114116
* Returns case insensitive LIKE construction.
117+
*
115118
* For options and escaping see escapeLikeValue().
116119
*
117120
* @param string $field

lib/internal/Magento/Framework/Filter/StripTags.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class StripTags implements \Zend_Filter_Interface
2727

2828
/**
2929
* @param \Magento\Framework\Escaper $escaper
30-
* @param null $allowableTags
30+
* @param string|null $allowableTags
3131
* @param bool $escape
3232
*/
3333
public function __construct(\Magento\Framework\Escaper $escaper, $allowableTags = null, $escape = false)
@@ -45,7 +45,7 @@ public function __construct(\Magento\Framework\Escaper $escaper, $allowableTags
4545
*/
4646
public function filter($value)
4747
{
48-
$result = is_string($value) ? strip_tags($value, $this->allowableTags) : '';
48+
$result = $value !== null ? strip_tags($value, $this->allowableTags) : '';
4949

5050
return $this->escape ? $this->escaper->escapeHtml($result, $this->allowableTags) : $result;
5151
}

lib/internal/Magento/Framework/Image/Adapter/Gd2.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
class Gd2 extends AbstractAdapter
1818
{
1919
/**
20-
* Required extensions
21-
*
2220
* @var array
2321
*/
2422
protected $_requiredExtensions = ["gd"];
@@ -270,6 +268,7 @@ private function _getCallback($callbackType, $fileType = null, $unsupportedText
270268
* @return void
271269
* @throws \InvalidArgumentException
272270
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
271+
* @SuppressWarnings(PHPMD.NPathComplexity)
273272
*/
274273
private function _fillBackgroundColor(&$imageResourceTo)
275274
{
@@ -476,6 +475,7 @@ public function watermark($imagePath, $positionX = 0, $positionY = 0, $opacity =
476475
* @return false|resource
477476
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
478477
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
478+
* @SuppressWarnings(PHPMD.NPathComplexity)
479479
*/
480480
private function createWatermarkBasedOnPosition(
481481
$watermark,

0 commit comments

Comments
 (0)