Skip to content

Commit 3e308da

Browse files
committed
Static test issues fixed;
1 parent 80bd6d3 commit 3e308da

File tree

10 files changed

+9
-19
lines changed

10 files changed

+9
-19
lines changed

app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/Eav.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1109,7 +1109,6 @@ private function calculateGroupCode(AttributeGroupInterface $group)
11091109
private function getLocaleCurrency()
11101110
{
11111111
if ($this->localeCurrency === null) {
1112-
// phpcs:ignore Magento2.PHP.AutogeneratedClassNotInConstructor
11131112
$this->localeCurrency = \Magento\Framework\App\ObjectManager::getInstance()->get(CurrencyInterface::class);
11141113
}
11151114
return $this->localeCurrency;

app/code/Magento/CatalogRule/Model/ResourceModel/Rule/Collection.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,6 @@ public function addCustomerGroupFilter($customerGroupId)
163163
private function getAssociatedEntitiesMap()
164164
{
165165
if (!$this->_associatedEntitiesMap) {
166-
// phpcs:ignore Magento2.PHP.AutogeneratedClassNotInConstructor
167166
$this->_associatedEntitiesMap = \Magento\Framework\App\ObjectManager::getInstance()
168167
// phpstan:ignore
169168
->get(\Magento\CatalogRule\Model\ResourceModel\Rule\AssociatedEntityMap::class)

app/code/Magento/Msrp/Model/Product/Options.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ public function __construct(
3838
* Is enabled
3939
*
4040
* @param \Magento\Catalog\Model\Product $product
41-
* @phpcs:ignore
42-
* @param null $visibility
41+
* @param int|null $visibility
4342
* @return bool|null
4443
*/
4544
public function isEnabled($product, $visibility = null)

app/code/Magento/Payment/Model/Method/Cc.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
* @method \Magento\Quote\Api\Data\PaymentMethodExtensionInterface getExtensionAttributes()
1616
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
1717
* @deprecated 100.0.8
18-
* @api
19-
* @phpcs:ignoreFile
2018
*/
2119
class Cc extends \Magento\Payment\Model\Method\AbstractMethod
2220
{
@@ -213,6 +211,7 @@ public function validate()
213211
* Check if verification should be used.
214212
*
215213
* @return bool
214+
* @api
216215
*/
217216
public function hasVerification()
218217
{
@@ -227,6 +226,7 @@ public function hasVerification()
227226
* Get list of credit cards verification reg exp.
228227
*
229228
* @return array
229+
* @api
230230
*/
231231
public function getVerificationRegEx()
232232
{
@@ -305,6 +305,7 @@ public function assignData(\Magento\Framework\DataObject $data)
305305
*
306306
* @param string $type
307307
* @return bool
308+
* @api
308309
*/
309310
public function otherCcType($type)
310311
{
@@ -316,6 +317,7 @@ public function otherCcType($type)
316317
*
317318
* @param string $ccNumber
318319
* @return bool
320+
* @api
319321
*/
320322
public function validateCcNum($ccNumber)
321323
{
@@ -355,6 +357,7 @@ public function validateCcNum($ccNumber)
355357
*
356358
* @param string $ccNumber
357359
* @return bool
360+
* @api
358361
*/
359362
public function validateCcNumOther($ccNumber)
360363
{

app/code/Magento/Persistent/Model/Session.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,6 @@ private function setCookie($value, $duration, $path)
392392
private function getRequest()
393393
{
394394
if ($this->request == null) {
395-
// phpcs:ignore Magento2.PHP.AutogeneratedClassNotInConstructor
396395
$this->request = \Magento\Framework\App\ObjectManager::getInstance()
397396
->get(\Magento\Framework\App\Request\Http::class);
398397
}

app/code/Magento/Shipping/Model/Carrier/AbstractCarrierOnline.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -428,8 +428,7 @@ protected function _setCachedQuotes($requestParams, $response)
428428
*/
429429
protected function _prepareServiceName($name)
430430
{
431-
//@phpcs:ignore
432-
$name = html_entity_decode((string)$name);
431+
$name = htmlspecialchars_decode((string)$name);
433432
$name = strip_tags(preg_replace('#&\w+;#', '', $name));
434433

435434
return trim($name);

app/code/Magento/Vault/Model/Ui/Adminhtml/TokensConfigProvider.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,6 @@ private function getOrderPaymentEntityId()
271271
private function getPaymentDataHelper()
272272
{
273273
if ($this->paymentDataHelper === null) {
274-
// phpcs:ignore Magento2.PHP.AutogeneratedClassNotInConstructor
275274
$this->paymentDataHelper = ObjectManager::getInstance()->get(Data::class);
276275
}
277276
return $this->paymentDataHelper;
@@ -286,7 +285,6 @@ private function getPaymentDataHelper()
286285
private function getOrderRepository()
287286
{
288287
if ($this->orderRepository === null) {
289-
// phpcs:ignore Magento2.PHP.AutogeneratedClassNotInConstructor
290288
$this->orderRepository = ObjectManager::getInstance()
291289
->get(OrderRepositoryInterface::class);
292290
}
@@ -303,7 +301,6 @@ private function getOrderRepository()
303301
private function getPaymentTokenManagement()
304302
{
305303
if ($this->paymentTokenManagement === null) {
306-
// phpcs:ignore Magento2.PHP.AutogeneratedClassNotInConstructor
307304
$this->paymentTokenManagement = ObjectManager::getInstance()
308305
->get(PaymentTokenManagementInterface::class);
309306
}

lib/internal/Magento/Framework/Model/ResourceModel/AbstractResource.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,6 @@ protected function _prepareTableValueForSave($value, $type)
201201
{
202202
$type = strtolower($type);
203203
if ($type == 'decimal' || $type == 'numeric' || $type == 'float') {
204-
// phpcs:ignore Magento2.PHP.AutogeneratedClassNotInConstructor
205204
$value = \Magento\Framework\App\ObjectManager::getInstance()->get(
206205
\Magento\Framework\Locale\FormatInterface::class
207206
)->getNumber(
@@ -255,7 +254,6 @@ protected function _getColumnsForEntityLoad(\Magento\Framework\Model\AbstractMod
255254
protected function getSerializer()
256255
{
257256
if (null === $this->serializer) {
258-
// phpcs:ignore Magento2.PHP.AutogeneratedClassNotInConstructor
259257
$this->serializer = ObjectManager::getInstance()->get(Json::class);
260258
}
261259
return $this->serializer;
@@ -270,7 +268,6 @@ protected function getSerializer()
270268
private function getLogger()
271269
{
272270
if (null === $this->_logger) {
273-
// phpcs:ignore Magento2.PHP.AutogeneratedClassNotInConstructor
274271
$this->_logger = ObjectManager::getInstance()->get(\Psr\Log\LoggerInterface::class);
275272
}
276273
return $this->_logger;

lib/internal/Magento/Framework/Model/ResourceModel/Db/AbstractDb.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,6 @@ public function __sleep()
155155
*/
156156
public function __wakeup()
157157
{
158-
// phpcs:ignore Magento2.PHP.AutogeneratedClassNotInConstructor
159158
$this->_resources = \Magento\Framework\App\ObjectManager::getInstance()
160159
->get(\Magento\Framework\App\ResourceConnection::class);
161160
}

lib/internal/Magento/Framework/Validator/DataObject.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,10 @@ public function isValid($entity)
6666
foreach ($this->_rules as $fieldName => $validator) {
6767
$value = $fieldName ? $entity->getDataUsingMethod($fieldName) : $entity;
6868
if (!$validator->isValid($value)) {
69-
//@phpcs:ignore
70-
$this->_messages = array_merge($this->_messages, array_values($validator->getMessages()));
69+
$this->_messages[] = array_values($validator->getMessages());
7170
}
7271
}
73-
return empty($this->_messages);
72+
return empty(array_merge([], ...$this->_messages));
7473
}
7574

7675
/**

0 commit comments

Comments
 (0)