File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
app/code/Magento/CatalogGraphQl/Model/Resolver/Products/DataProvider/CategoryTree/Wrapper Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,14 @@ class Forgery
28
28
*/
29
29
private $ hydrator ;
30
30
31
+ /**
32
+ * @param Hydrator $hydrator
33
+ */
34
+ public function __construct (Hydrator $ hydrator )
35
+ {
36
+ $ this ->hydrator = $ hydrator ;
37
+ }
38
+
31
39
/**
32
40
* Forge the node and put it into index.
33
41
*
@@ -79,13 +87,10 @@ public function hasNodeById(int $id) : bool
79
87
/**
80
88
* Get category hydrator.
81
89
*
82
- * @return Hydrator|mixed
90
+ * @return Hydrator
83
91
*/
84
92
public function getHydrator ()
85
93
{
86
- if (!$ this ->hydrator instanceof Hydrator) {
87
- $ this ->hydrator = ObjectManager::getInstance ()->get (Hydrator::class);
88
- }
89
94
return $ this ->hydrator ;
90
95
}
91
96
}
You can’t perform that action at this time.
0 commit comments