Skip to content

Commit 0663d8f

Browse files
authored
Merge pull request #90 from php-api-clients/set-hydrator-in-webhook-constructor
Set hydrator in webhook constructor
2 parents 0bb32d6 + a3c1924 commit 0663d8f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/Generator/WebHook.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,14 @@ public static function generate(string $namespace, string $event, SchemaRegistry
4242
),
4343
new Node\Expr\Variable('requestSchemaValidator'),
4444
)
45+
)->addStmt(
46+
new Node\Expr\Assign(
47+
new Node\Expr\PropertyFetch(
48+
new Node\Expr\Variable('this'),
49+
'hydrator'
50+
),
51+
new Node\Expr\Variable('hydrator'),
52+
)
4553
);
4654
$class->addStmt($constructor);
4755

0 commit comments

Comments
 (0)