Skip to content

Commit

Permalink
respect the interface
Browse files Browse the repository at this point in the history
  • Loading branch information
lyrixx committed Oct 23, 2023
1 parent 7d76f44 commit 0b29433
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/Twig/WorkflowExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@ public function __construct(
private readonly ContainerInterface $workflows,
) {}

public function getFunctions(): iterable
public function getFunctions(): array
{
yield new TwigFunction('workflow_all_transitions', $this->getTransitions(...));
yield new TwigFunction('workflow_dump', $this->dump(...));
return [
new TwigFunction('workflow_all_transitions', $this->getTransitions(...)),
new TwigFunction('workflow_dump', $this->dump(...)),
];
}

// This method is a hack to get all transitions, enabled or not.
Expand Down

0 comments on commit 0b29433

Please sign in to comment.