Skip to content

Commit 5fe717d

Browse files
committed
feat: change HasPrePostActions::getCallbackActions
1 parent e95a429 commit 5fe717d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Traits/HasPrePostActions.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,11 @@ public function addCallbackAction(string $key, callable $action): self
1616
return $this;
1717
}
1818

19-
public function getCallbackActions(string $key): array
19+
public function getCallbackActions(string $key = null): array
2020
{
21-
return (array)($this->executeCallbacks[$key] ?? []);
21+
return $key ?
22+
$this->executeCallbacks[$key] ?? []
23+
: $this->executeCallbacks;
2224
}
2325

2426
protected function runActions(string $actionGroup, ...$arguments): bool

0 commit comments

Comments
 (0)