Skip to content

Commit efc5e5e

Browse files
committed
Fix WorkflowInit detection
1 parent c8c16c5 commit efc5e5e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/Internal/Declaration/Reader/WorkflowReader.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,12 @@ private function withMethods(ClassNode $graph, WorkflowPrototype $prototype): Wo
128128

129129
// Check WorkflowInit method
130130
if ($method->isConstructor()) {
131-
$this->getAttributedMethod($graph, $method, WorkflowInit::class);
132-
$prototype->setHasInitializer(true);
131+
$attr = $this->getAttributedMethod($graph, $method, WorkflowInit::class);
132+
133+
if ($attr !== null) {
134+
$prototype->setHasInitializer(true);
135+
}
136+
133137
continue;
134138
}
135139

0 commit comments

Comments
 (0)