File tree Expand file tree Collapse file tree 1 file changed +1
-16
lines changed
lib/internal/Magento/Framework/EntityManager Expand file tree Collapse file tree 1 file changed +1
-16
lines changed Original file line number Diff line number Diff line change 5
5
*/
6
6
namespace Magento \Framework \EntityManager ;
7
7
8
- use Magento \Catalog \Model \Category ;
9
-
10
8
/**
11
9
* Resolves types.
12
10
*/
@@ -56,7 +54,7 @@ public function resolve($type)
56
54
$ interfaceNames = $ reflectionClass ->getInterfaceNames ();
57
55
$ dataInterfaces = [];
58
56
foreach ($ interfaceNames as $ interfaceName ) {
59
- if ($ this -> isDataInterface ($ interfaceName , $ type ) ) {
57
+ if (strpos ($ interfaceName , ' \Api\Data \\' ) !== false ) {
60
58
$ dataInterfaces [] = $ interfaceName ;
61
59
}
62
60
}
@@ -75,17 +73,4 @@ public function resolve($type)
75
73
}
76
74
return $ this ->typeMapping [$ className ];
77
75
}
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
- }
91
76
}
You can’t perform that action at this time.
0 commit comments