Skip to content

Commit 0446ec9

Browse files
committed
MC-33699: Stabilize MFTF tests
1 parent ba5aa76 commit 0446ec9

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

lib/internal/Magento/Framework/EntityManager/TypeResolver.php

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
*/
66
namespace Magento\Framework\EntityManager;
77

8-
use Magento\Catalog\Model\Category;
9-
108
/**
119
* Resolves types.
1210
*/
@@ -56,7 +54,7 @@ public function resolve($type)
5654
$interfaceNames = $reflectionClass->getInterfaceNames();
5755
$dataInterfaces = [];
5856
foreach ($interfaceNames as $interfaceName) {
59-
if ($this->isDataInterface($interfaceName, $type)) {
57+
if (strpos($interfaceName, '\Api\Data\\') !== false) {
6058
$dataInterfaces[] = $interfaceName;
6159
}
6260
}
@@ -75,17 +73,4 @@ public function resolve($type)
7573
}
7674
return $this->typeMapping[$className];
7775
}
78-
79-
/**
80-
* Checks whether interface has Data type.
81-
*
82-
* @param string $interfaceName
83-
* @param object $entityType
84-
* @return bool
85-
*/
86-
private function isDataInterface(string $interfaceName, $entityType): bool
87-
{
88-
return strpos($interfaceName, '\Api\Data\\') !== false
89-
&& (!$entityType instanceof Category || preg_match('/Category(?!Tree)/', $interfaceName));
90-
}
9176
}

0 commit comments

Comments
 (0)