Skip to content

Commit bcbaa13

Browse files
committed
Fixed static tests
1 parent 8be5d3e commit bcbaa13

File tree

7 files changed

+26
-13
lines changed

7 files changed

+26
-13
lines changed

lib/internal/Magento/Framework/DB/AbstractMapper.php

Lines changed: 3 additions & 1 deletion
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\Framework\DB;
78

89
use Magento\Framework\Api\CriteriaInterface;
@@ -392,9 +393,10 @@ protected function getConditionFieldName($fieldName)
392393

393394
/**
394395
* Hook for operations before rendering filters
396+
*
395397
* @return void
396398
*/
397-
protected function renderFiltersBefore()
399+
protected function renderFiltersBefore() //phpcs:ignore Magento2.CodeAnalysis.EmptyBlock
398400
{
399401
}
400402

lib/internal/Magento/Framework/MessageQueue/Rpc/Publisher.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public function __construct(
7272
//@codingStandardsIgnoreEnd
7373

7474
/**
75-
* {@inheritdoc}
75+
* @inheritdoc
7676
*/
7777
public function publish($topicName, $data)
7878
{

lib/internal/Magento/Framework/Model/AbstractModel.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*/
66
namespace Magento\Framework\Model;
77

8+
use Magento\Framework\DataObject;
89
use Magento\Framework\Phrase;
910

1011
/**
@@ -14,10 +15,12 @@
1415
* @api
1516
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
1617
* @SuppressWarnings(PHPMD.NumberOfChildren)
18+
* @SuppressWarnings(PHPMD.ExcessiveClassComplexity)
19+
* @SuppressWarnings(PHPMD.ExcessiveClassLength)
1720
* @SuppressWarnings(PHPMD.TooManyFields)
1821
* @since 100.0.2
1922
*/
20-
abstract class AbstractModel extends \Magento\Framework\DataObject
23+
abstract class AbstractModel extends DataObject
2124
{
2225
/**
2326
* Prefix of model events names
@@ -186,8 +189,9 @@ public function __construct(
186189
$this->_logger = $context->getLogger();
187190
$this->_actionValidator = $context->getActionValidator();
188191

189-
if ((($this->_resource !== null) && (method_exists($this->_resource, 'getIdFieldName')))
190-
|| $this->_resource instanceof \Magento\Framework\DataObject
192+
if (
193+
$this->_resource !== null
194+
&& (method_exists($this->_resource, 'getIdFieldName') || ($this->_resource instanceof DataObject))
191195
) {
192196
$this->_idFieldName = $this->_getResource()->getIdFieldName();
193197
}

lib/internal/Magento/Framework/View/Layout/Generator/Block.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
use Magento\Framework\View\Layout;
1313

1414
/**
15-
* Class Block
15+
* The block of the layout generator
1616
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
1717
*/
1818
class Block implements Layout\GeneratorInterface

setup/src/Magento/Setup/Module/Di/Code/Reader/FileScanner.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
namespace Magento\Setup\Module\Di\Code\Reader;
88

9-
use Laminas\Code\Exception;
9+
use Laminas\Code\Exception\InvalidArgumentException;
1010
use Laminas\Code\Exception\RuntimeException;
1111

1212
/**
@@ -46,17 +46,19 @@ class FileScanner
4646
*
4747
* @param string $file
4848
*
49-
* @throws Exception\InvalidArgumentException
49+
* @throws InvalidArgumentException
5050
*/
5151
public function __construct(string $file)
5252
{
5353
$this->file = $file;
54+
// phpcs:ignore Magento2.Functions.DiscouragedFunction
5455
if (!file_exists($file)) {
55-
throw new Exception\InvalidArgumentException(sprintf(
56+
throw new InvalidArgumentException(sprintf(
5657
'File "%s" not found',
5758
$file
5859
));
5960
}
61+
// phpcs:ignore Magento2.Functions.DiscouragedFunction
6062
$tokens = token_get_all(file_get_contents($file));
6163
$this->tokens = $tokens;
6264
}
@@ -413,7 +415,7 @@ protected function scan()
413415
}
414416

415417
/**
416-
* copied from laminas-code 3.5.1
418+
* Copied from laminas-code 3.5.1
417419
*
418420
* @param string|null $namespace
419421
*
@@ -427,7 +429,7 @@ public function getUses(string $namespace = null): ?array
427429
}
428430

429431
/**
430-
* copied from laminas-code 3.5.1
432+
* Copied from laminas-code 3.5.1
431433
*
432434
* @param string|null $namespace
433435
*

setup/src/Magento/Setup/Module/I18n/Parser/Adapter/Php/Tokenizer.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
67
namespace Magento\Setup\Module\I18n\Parser\Adapter\Php;
78

89
/**
9-
* Tokenizer
10+
* The PHP tokenizer for i18n parser
1011
*/
1112
class Tokenizer
1213
{
@@ -46,6 +47,7 @@ class Tokenizer
4647
*/
4748
public function parse($filePath)
4849
{
50+
// phpcs:ignore Magento2.Functions.DiscouragedFunction
4951
$this->_tokens = token_get_all(file_get_contents($filePath));
5052
$this->_tokensCount = count($this->_tokens);
5153
}

setup/src/Magento/Setup/Module/I18n/Parser/Adapter/Php/Tokenizer/Token.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
67
namespace Magento\Setup\Module\I18n\Parser\Adapter\Php\Tokenizer;
78

89
/**
9-
* Token
10+
* The PHP tokenizer token for i18n parser
1011
*/
1112
class Token
1213
{
@@ -177,6 +178,8 @@ public function isSemicolon()
177178
}
178179

179180
/**
181+
* Checks value if this is concatenation operator
182+
*
180183
* @return bool
181184
*/
182185
public function isConcatenateOperator()

0 commit comments

Comments
 (0)