@@ -52,8 +52,6 @@ public static function generate(string $namespace, string $baseNamespace, array
52
52
],
53
53
Class_::MODIFIER_PUBLIC
54
54
)
55
- )->addStmt (
56
- $ factory ->property ('hydrator ' )->setType ('\\' . $ baseNamespace . 'OptimizedHydratorMapper ' )->makeReadonly ()->makePrivate ()
57
55
)->addStmt (
58
56
$ factory ->method ('__construct ' )->makePublic ()->addStmt (
59
57
new Node \Expr \Assign (
@@ -117,37 +115,8 @@ public static function generate(string $namespace, string $baseNamespace, array
117
115
)
118
116
)
119
117
))
120
- )->addStmt (
121
- $ factory ->method ('hydrate ' )->makePublic ()->setReturnType ('object ' )->addParam (
122
- (new Param ('event ' ))->setType ('string ' )
123
- )->addParam (
124
- (new Param ('data ' ))->setType ('array ' )
125
- )->addStmt (new Node \Stmt \Return_ (
126
- new Node \Expr \MethodCall (
127
- new Node \Expr \PropertyFetch (
128
- new Node \Expr \Variable ('this ' ),
129
- 'hydrator '
130
- ),
131
- new Node \Name ('hydrateObject ' ),
132
- [
133
- new Node \Arg (new Node \Expr \MethodCall (
134
- new Node \Expr \StaticCall (
135
- new Node \Name ('self ' ),
136
- new Node \Name ('resolve ' ),
137
- [
138
- new Node \Arg (new Node \Expr \Variable ('event ' )),
139
- ]
140
- ),
141
- new Node \Name ('resolve ' ),
142
- [
143
- new Node \Arg (new Node \Expr \Variable ('data ' )),
144
- ]
145
- )),
146
- new Node \Arg (new Node \Expr \Variable ('data ' )),
147
- ]
148
- )
149
- ))
150
118
);
119
+
151
120
yield new File ($ namespace . '\\' . 'WebHooks ' , $ stmt ->addStmt ($ class )->getNode ());
152
121
}
153
122
}
0 commit comments