Skip to content

Commit 9c4aaaf

Browse files
authored
Merge pull request #102 from magento-commerce/MQE-2721
MQE-2721: [PHP 8] Remove usage of reserved keyword "match"
2 parents 6fdd6db + aa70d79 commit 9c4aaaf

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/Magento/FunctionalTestingFramework/Config/Dom/ArrayNodeConfig.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public function __construct(
6464
public function isNumericArray($nodeXpath)
6565
{
6666
foreach ($this->numericArrays as $pathPattern) {
67-
if ($this->nodePathMatcher->match($pathPattern, $nodeXpath)) {
67+
if ($this->nodePathMatcher->pathMatch($pathPattern, $nodeXpath)) {
6868
return true;
6969
}
7070
}
@@ -84,7 +84,7 @@ public function getAssocArrayKeyAttribute($nodeXpath)
8484
}
8585

8686
foreach ($this->assocArrays as $pathPattern => $keyAttribute) {
87-
if ($this->nodePathMatcher->match($pathPattern, $nodeXpath)) {
87+
if ($this->nodePathMatcher->pathMatch($pathPattern, $nodeXpath)) {
8888
return $keyAttribute;
8989
}
9090
}

src/Magento/FunctionalTestingFramework/Config/Dom/NodeMergingConfig.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function __construct(NodePathMatcher $nodePathMatcher, array $idAttribute
4444
public function getIdAttribute($nodeXpath)
4545
{
4646
foreach ($this->idAttributes as $pathPattern => $idAttribute) {
47-
if ($this->nodePathMatcher->match($pathPattern, $nodeXpath)) {
47+
if ($this->nodePathMatcher->pathMatch($pathPattern, $nodeXpath)) {
4848
return $idAttribute;
4949
}
5050
}

src/Magento/FunctionalTestingFramework/Config/Dom/NodePathMatcher.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class NodePathMatcher
1717
* @param string $xpathSubject Example: '/some[@attr="value"]/static/ns:path'.
1818
* @return boolean
1919
*/
20-
public function match($pathPattern, $xpathSubject)
20+
public function pathMatch($pathPattern, $xpathSubject)
2121
{
2222
$pathSubject = $this->simplifyXpath($xpathSubject);
2323
$pathPattern = '#^' . $pathPattern . '$#';

0 commit comments

Comments
 (0)