Skip to content

Commit

Permalink
Fixes the problem with workflow interfaces generation
Browse files Browse the repository at this point in the history
  • Loading branch information
butschster committed Nov 23, 2022
1 parent 5cb7dc3 commit 2371e7e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Generator/ActivityInterfaceGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ final class ActivityInterfaceGenerator implements FileGeneratorInterface
{
public function generate(Context $context, PhpNamespace $namespace): PhpCodePrinter
{
$class = \Nette\PhpGenerator\InterfaceType::from($context->getClass());
$class = new \Nette\PhpGenerator\InterfaceType($context->getClass(), $namespace);
$class->addAttribute(ActivityInterface::class, ['prefix' => $context->getBaseClass('.')]);

foreach ($context->getActivityMethods() as $method) {
Expand Down
2 changes: 1 addition & 1 deletion src/Generator/HandlerInterfaceGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class HandlerInterfaceGenerator implements FileGeneratorInterface
{
public function generate(Context $context, PhpNamespace $namespace): PhpCodePrinter
{
$class = \Nette\PhpGenerator\InterfaceType::from($context->getClass());
$class = new \Nette\PhpGenerator\InterfaceType($context->getClass(), $namespace);

$class->addMember($handler = $context->getHandlerMethod());
$handler->setReturnType(RunningWorkflow::class);
Expand Down
2 changes: 1 addition & 1 deletion src/Generator/WorkflowInterfaceGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public function generate(Context $context, PhpNamespace $namespace): PhpCodePrin
{
$className = $context->getClass();

$class = \Nette\PhpGenerator\InterfaceType::from($className);
$class = new \Nette\PhpGenerator\InterfaceType($className, $namespace);

$class->addAttribute(WorkflowInterface::class);

Expand Down

0 comments on commit 2371e7e

Please sign in to comment.