Skip to content

Commit b91d0d4

Browse files
committed
AC-663: Create phpcs static check for ClassesTest::testPhpCode
1 parent 0293560 commit b91d0d4

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

Magento2/Sniffs/Legacy/ClassesConfigurationSniff.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
<?php
22
/**
3-
* Copyright © Magento. All rights reserved.
3+
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
67
namespace Magento2\Sniffs\Legacy;
78

89
use DOMDocument;
@@ -114,6 +115,8 @@ private function getFormattedXML(File $phpcsFile)
114115
}
115116

116117
/**
118+
* Parse an XML for references to PHP class names in selected tags or attributes
119+
*
117120
* @param SimpleXMLElement $xml
118121
* @return array
119122
*/
@@ -137,7 +140,7 @@ private function collectClassesInConfig(SimpleXMLElement $xml): array
137140
);
138141

139142
$classes = array_map(
140-
function(ExtendedNode $extendedNode) {
143+
function (ExtendedNode $extendedNode) {
141144
$extendedNode->value = explode('::', trim($extendedNode->value))[0];
142145
return $extendedNode;
143146
},

Magento2/Sniffs/Legacy/ExtendedNode.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
26

37
namespace Magento2\Sniffs\Legacy;
48

0 commit comments

Comments
 (0)