Fix closures and adding parsed Actions
This commit is contained in:
parent
d04021b1ac
commit
57c273b2da
|
@ -71,7 +71,7 @@ class Manager implements IManager {
|
|||
}
|
||||
|
||||
foreach ($this->appsClosures as $closure) {
|
||||
$app = $closure;
|
||||
$app = $closure();
|
||||
if (!($app instanceof IApp)) {
|
||||
throw new \InvalidArgumentException('The given notification app does not implement the IApp interface');
|
||||
}
|
||||
|
@ -90,7 +90,7 @@ class Manager implements IManager {
|
|||
}
|
||||
|
||||
foreach ($this->notifiersClosures as $closure) {
|
||||
$notifier = $closure;
|
||||
$notifier = $closure();
|
||||
if (!($notifier instanceof INotifier)) {
|
||||
throw new \InvalidArgumentException('The given notification app does not implement the INotifier interface');
|
||||
}
|
||||
|
|
|
@ -393,7 +393,7 @@ class Notification implements INotification {
|
|||
if (!$action->isValidParsed()) {
|
||||
throw new \InvalidArgumentException('The given parsed action is invalid');
|
||||
}
|
||||
$this->actions[] = $action;
|
||||
$this->actionsParsed[] = $action;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue