Skip to content

Commit 73c64de

Browse files
authored
Update Reject.php
1 parent 8d6932c commit 73c64de

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

src/Plugin/Filtering/Builder/Reject.php

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,23 @@ class: new Node\Stmt\Class_(null, [
122122
new Node\Expr\Variable('input'),
123123
new Node\Expr\Yield_(
124124
new Node\Expr\New_(
125-
new Node\Name\FullyQualified('Kiboko\\Component\\Bucket\\RejectionResultBucket'),
126-
[
127-
new Node\Arg(new Node\Expr\Variable('input')),
128-
]
125+
class: new Node\Name\FullyQualified(
126+
\Kiboko\Component\Bucket\RejectionResultBucket::class
127+
),
128+
args: [
129+
new Node\Arg(
130+
new Node\Expr\MethodCall(
131+
new Node\Expr\Variable('exception'),
132+
'getMessage'
133+
),
134+
),
135+
new Node\Expr\ConstFetch(
136+
new Node\Expr\Variable('exception'),
137+
),
138+
new Node\Arg(
139+
new Node\Expr\Variable('input'),
140+
),
141+
],
129142
),
130143
),
131144
),

0 commit comments

Comments
 (0)