Skip to content

Commit 5aa5721

Browse files
committed
AC-663: Create phpcs static check for ClassesTest::testPhpCode
1 parent 64fa0cc commit 5aa5721

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Magento2/Sniffs/Legacy/ClassReferencesInConfigurationFilesSniff.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -175,26 +175,26 @@ function (ExtendedNode $extendedNode) {
175175

176176
/**
177177
* Extract value from the specified $extractFrom which exist in the XML path
178-
*
178+
*
179179
* @param SimpleXMLElement $xml
180180
* @param string $xPath
181181
* @param int $extractFrom
182-
* @param string $attribute
182+
* @param string $attr
183183
* @return array
184184
*/
185-
private function getValuesFromXml(SimpleXMLElement $xml, string $xPath, int $extractFrom, string $attribute = ''): array
185+
private function getValuesFromXml(SimpleXMLElement $xml, string $xPath, int $extractFrom, string $attr = ''): array
186186
{
187187
$nodes = $xml->xpath($xPath) ?: [];
188-
return array_map(function($item) use ($extractFrom, $attribute) {
188+
return array_map(function ($item) use ($extractFrom, $attr) {
189189
switch ($extractFrom) {
190190
case self::FROM_CONTENT:
191191
return new ExtendedNode((string)$item, $item);
192192
case self::FROM_NAME:
193193
return new ExtendedNode($item->getName(), $item);
194194
case self::FROM_ATTRIBUTE:
195195
$nodeArray = (array)$item;
196-
if (isset($nodeArray['@attributes'][$attribute])) {
197-
return new ExtendedNode($nodeArray['@attributes'][$attribute], $item);
196+
if (isset($nodeArray['@attributes'][$attr])) {
197+
return new ExtendedNode($nodeArray['@attributes'][$attr], $item);
198198
}
199199
}
200200
}, $nodes);

0 commit comments

Comments
 (0)