Skip to content

Commit 7da6807

Browse files
committed
Static test fix
1 parent 38c9db4 commit 7da6807

File tree

5 files changed

+40
-27
lines changed

5 files changed

+40
-27
lines changed

dev/tests/functional/lib/Magento/Mtf/Client/Element/LiselectstoreElement.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
use Magento\Mtf\Client\Locator;
1010

1111
/**
12-
* Class LiselectstoreElement
1312
* Typified element class for lists selectors
1413
*/
1514
class LiselectstoreElement extends SimpleElement
@@ -76,6 +75,7 @@ public function setValue($value)
7675

7776
$option = $this->context->find($optionSelector, Locator::SELECTOR_XPATH);
7877
if (!$option->isVisible()) {
78+
// phpcs:ignore Magento2.Exceptions.DirectThrow
7979
throw new \Exception('[' . implode('/', $value) . '] option is not visible in store switcher.');
8080
}
8181
$option->click();
@@ -157,8 +157,8 @@ protected function findNearestElement($criteria, $key, array $elements)
157157
/**
158158
* Get selected store value
159159
*
160-
* @throws \Exception
161160
* @return string
161+
* @throws \Exception
162162
*/
163163
public function getValue()
164164
{

lib/internal/Magento/Framework/Acl/AclResource/Config/Converter/Dom.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,13 @@
55
*/
66
namespace Magento\Framework\Acl\AclResource\Config\Converter;
77

8+
/**
9+
* @inheritDoc
10+
*/
811
class Dom implements \Magento\Framework\Config\ConverterInterface
912
{
1013
/**
11-
* {@inheritdoc}
14+
* @inheritdoc
1215
*
1316
* @param \DOMDocument $source
1417
* @return array
@@ -39,6 +42,7 @@ protected function _convertResourceNode(\DOMNode $resourceNode)
3942
$resourceAttributes = $resourceNode->attributes;
4043
$idNode = $resourceAttributes->getNamedItem('id');
4144
if ($idNode === null) {
45+
// phpcs:ignore Magento2.Exceptions.DirectThrow
4246
throw new \Exception('Attribute "id" is required for ACL resource.');
4347
}
4448
$resourceData['id'] = $idNode->nodeValue;

lib/internal/Magento/Framework/Code/Reader/NamespaceResolver.php

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -101,16 +101,22 @@ public function getImportedNamespaces(array $fileContent)
101101
$imports[$importsCount][] = $item;
102102
}
103103
foreach ($imports as $import) {
104-
$import = array_filter($import, function ($token) {
105-
$whitelist = [T_NS_SEPARATOR, T_STRING, T_AS];
106-
if (isset($token[0]) && in_array($token[0], $whitelist)) {
107-
return true;
104+
$import = array_filter(
105+
$import,
106+
function ($token) {
107+
$whitelist = [T_NS_SEPARATOR, T_STRING, T_AS];
108+
if (isset($token[0]) && in_array($token[0], $whitelist)) {
109+
return true;
110+
}
111+
return false;
108112
}
109-
return false;
110-
});
111-
$import = array_map(function ($element) {
112-
return $element[1];
113-
}, $import);
113+
);
114+
$import = array_map(
115+
function ($element) {
116+
return $element[1];
117+
},
118+
import
119+
);
114120
$import = array_values($import);
115121
if ($import[0] === self::NS_SEPARATOR) {
116122
array_shift($import);

lib/internal/Magento/Framework/HTTP/PhpEnvironment/Response.php

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,24 @@
11
<?php
22
/**
3-
* Base HTTP response object
4-
*
53
* Copyright © Magento, Inc. All rights reserved.
64
* See COPYING.txt for license details.
75
*/
86
namespace Magento\Framework\HTTP\PhpEnvironment;
97

8+
/**
9+
* Base HTTP response object
10+
*/
1011
class Response extends \Zend\Http\PhpEnvironment\Response implements \Magento\Framework\App\Response\HttpInterface
1112
{
1213
/**
1314
* Flag; is this response a redirect?
15+
*
1416
* @var boolean
1517
*/
1618
protected $isRedirect = false;
1719

1820
/**
19-
* {@inheritdoc}
21+
* @inheritdoc
2022
*/
2123
public function getHeader($name)
2224
{
@@ -29,8 +31,7 @@ public function getHeader($name)
2931
}
3032

3133
/**
32-
* Send the response, including all headers, rendering exceptions if so
33-
* requested.
34+
* Send the response, including all headers, rendering exceptions if so requested.
3435
*
3536
* @return void
3637
*/
@@ -40,7 +41,7 @@ public function sendResponse()
4041
}
4142

4243
/**
43-
* {@inheritdoc}
44+
* @inheritdoc
4445
*/
4546
public function appendBody($value)
4647
{
@@ -50,7 +51,7 @@ public function appendBody($value)
5051
}
5152

5253
/**
53-
* {@inheritdoc}
54+
* @inheritdoc
5455
*/
5556
public function setBody($value)
5657
{
@@ -60,6 +61,7 @@ public function setBody($value)
6061

6162
/**
6263
* Clear body
64+
*
6365
* @return $this
6466
*/
6567
public function clearBody()
@@ -69,7 +71,7 @@ public function clearBody()
6971
}
7072

7173
/**
72-
* {@inheritdoc}
74+
* @inheritdoc
7375
*/
7476
public function setHeader($name, $value, $replace = false)
7577
{
@@ -84,7 +86,7 @@ public function setHeader($name, $value, $replace = false)
8486
}
8587

8688
/**
87-
* {@inheritdoc}
89+
* @inheritdoc
8890
*/
8991
public function clearHeader($name)
9092
{
@@ -111,7 +113,7 @@ public function clearHeaders()
111113
}
112114

113115
/**
114-
* {@inheritdoc}
116+
* @inheritdoc
115117
*/
116118
public function setRedirect($url, $code = 302)
117119
{
@@ -122,7 +124,7 @@ public function setRedirect($url, $code = 302)
122124
}
123125

124126
/**
125-
* {@inheritdoc}
127+
* @inheritdoc
126128
*/
127129
public function setHttpResponseCode($code)
128130
{
@@ -137,7 +139,7 @@ public function setHttpResponseCode($code)
137139
}
138140

139141
/**
140-
* {@inheritdoc}
142+
* @inheritdoc
141143
*/
142144
public function setStatusHeader($httpCode, $version = null, $phrase = null)
143145
{
@@ -152,7 +154,7 @@ public function setStatusHeader($httpCode, $version = null, $phrase = null)
152154
}
153155

154156
/**
155-
* {@inheritdoc}
157+
* @inheritdoc
156158
*/
157159
public function getHttpResponseCode()
158160
{
@@ -170,6 +172,8 @@ public function isRedirect()
170172
}
171173

172174
/**
175+
* @inheritDoc
176+
*
173177
* @return string[]
174178
*/
175179
public function __sleep()

lib/internal/Magento/Framework/Url.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -675,8 +675,7 @@ protected function _getControllerName($default = null)
675675
}
676676

677677
/**
678-
* Set Action name
679-
* Reseted route path if action name has change
678+
* Set Action name, reseated route path if action name has change
680679
*
681680
* @param string $data
682681
* @return \Magento\Framework\UrlInterface

0 commit comments

Comments
 (0)