File tree Expand file tree Collapse file tree 7 files changed +26
-13
lines changed
lib/internal/Magento/Framework
setup/src/Magento/Setup/Module Expand file tree Collapse file tree 7 files changed +26
-13
lines changed Original file line number Diff line number Diff line change 3
3
* Copyright © Magento, Inc. All rights reserved.
4
4
* See COPYING.txt for license details.
5
5
*/
6
+
6
7
namespace Magento \Framework \DB ;
7
8
8
9
use Magento \Framework \Api \CriteriaInterface ;
@@ -392,9 +393,10 @@ protected function getConditionFieldName($fieldName)
392
393
393
394
/**
394
395
* Hook for operations before rendering filters
396
+ *
395
397
* @return void
396
398
*/
397
- protected function renderFiltersBefore ()
399
+ protected function renderFiltersBefore () //phpcs:ignore Magento2.CodeAnalysis.EmptyBlock
398
400
{
399
401
}
400
402
Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ public function __construct(
72
72
//@codingStandardsIgnoreEnd
73
73
74
74
/**
75
- * { @inheritdoc}
75
+ * @inheritdoc
76
76
*/
77
77
public function publish ($ topicName , $ data )
78
78
{
Original file line number Diff line number Diff line change 5
5
*/
6
6
namespace Magento \Framework \Model ;
7
7
8
+ use Magento \Framework \DataObject ;
8
9
use Magento \Framework \Phrase ;
9
10
10
11
/**
14
15
* @api
15
16
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
16
17
* @SuppressWarnings(PHPMD.NumberOfChildren)
18
+ * @SuppressWarnings(PHPMD.ExcessiveClassComplexity)
19
+ * @SuppressWarnings(PHPMD.ExcessiveClassLength)
17
20
* @SuppressWarnings(PHPMD.TooManyFields)
18
21
* @since 100.0.2
19
22
*/
20
- abstract class AbstractModel extends \ Magento \ Framework \ DataObject
23
+ abstract class AbstractModel extends DataObject
21
24
{
22
25
/**
23
26
* Prefix of model events names
@@ -186,8 +189,9 @@ public function __construct(
186
189
$ this ->_logger = $ context ->getLogger ();
187
190
$ this ->_actionValidator = $ context ->getActionValidator ();
188
191
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))
191
195
) {
192
196
$ this ->_idFieldName = $ this ->_getResource ()->getIdFieldName ();
193
197
}
Original file line number Diff line number Diff line change 12
12
use Magento \Framework \View \Layout ;
13
13
14
14
/**
15
- * Class Block
15
+ * The block of the layout generator
16
16
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
17
17
*/
18
18
class Block implements Layout \GeneratorInterface
Original file line number Diff line number Diff line change 6
6
7
7
namespace Magento \Setup \Module \Di \Code \Reader ;
8
8
9
- use Laminas \Code \Exception ;
9
+ use Laminas \Code \Exception \ InvalidArgumentException ;
10
10
use Laminas \Code \Exception \RuntimeException ;
11
11
12
12
/**
@@ -46,17 +46,19 @@ class FileScanner
46
46
*
47
47
* @param string $file
48
48
*
49
- * @throws Exception\ InvalidArgumentException
49
+ * @throws InvalidArgumentException
50
50
*/
51
51
public function __construct (string $ file )
52
52
{
53
53
$ this ->file = $ file ;
54
+ // phpcs:ignore Magento2.Functions.DiscouragedFunction
54
55
if (!file_exists ($ file )) {
55
- throw new Exception \ InvalidArgumentException (sprintf (
56
+ throw new InvalidArgumentException (sprintf (
56
57
'File "%s" not found ' ,
57
58
$ file
58
59
));
59
60
}
61
+ // phpcs:ignore Magento2.Functions.DiscouragedFunction
60
62
$ tokens = token_get_all (file_get_contents ($ file ));
61
63
$ this ->tokens = $ tokens ;
62
64
}
@@ -413,7 +415,7 @@ protected function scan()
413
415
}
414
416
415
417
/**
416
- * copied from laminas-code 3.5.1
418
+ * Copied from laminas-code 3.5.1
417
419
*
418
420
* @param string|null $namespace
419
421
*
@@ -427,7 +429,7 @@ public function getUses(string $namespace = null): ?array
427
429
}
428
430
429
431
/**
430
- * copied from laminas-code 3.5.1
432
+ * Copied from laminas-code 3.5.1
431
433
*
432
434
* @param string|null $namespace
433
435
*
Original file line number Diff line number Diff line change 3
3
* Copyright © Magento, Inc. All rights reserved.
4
4
* See COPYING.txt for license details.
5
5
*/
6
+
6
7
namespace Magento \Setup \Module \I18n \Parser \Adapter \Php ;
7
8
8
9
/**
9
- * Tokenizer
10
+ * The PHP tokenizer for i18n parser
10
11
*/
11
12
class Tokenizer
12
13
{
@@ -46,6 +47,7 @@ class Tokenizer
46
47
*/
47
48
public function parse ($ filePath )
48
49
{
50
+ // phpcs:ignore Magento2.Functions.DiscouragedFunction
49
51
$ this ->_tokens = token_get_all (file_get_contents ($ filePath ));
50
52
$ this ->_tokensCount = count ($ this ->_tokens );
51
53
}
Original file line number Diff line number Diff line change 3
3
* Copyright © Magento, Inc. All rights reserved.
4
4
* See COPYING.txt for license details.
5
5
*/
6
+
6
7
namespace Magento \Setup \Module \I18n \Parser \Adapter \Php \Tokenizer ;
7
8
8
9
/**
9
- * Token
10
+ * The PHP tokenizer token for i18n parser
10
11
*/
11
12
class Token
12
13
{
@@ -177,6 +178,8 @@ public function isSemicolon()
177
178
}
178
179
179
180
/**
181
+ * Checks value if this is concatenation operator
182
+ *
180
183
* @return bool
181
184
*/
182
185
public function isConcatenateOperator ()
You can’t perform that action at this time.
0 commit comments