Skip to content

Commit

Permalink
Add return statements after redirects.
Browse files Browse the repository at this point in the history
  • Loading branch information
Bruno Vitorino committed Aug 11, 2017
1 parent 9240ec7 commit 1a10186
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Backend/Modules/Partners/Actions/Delete.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public function execute(): void
['error' => 'non-existing']
)
);
return;
}
$this->get('command_bus')->handle(new DeleteWidget($widget));

Expand All @@ -38,5 +39,6 @@ public function execute(): void
]
)
);
return;
}
}
2 changes: 2 additions & 0 deletions src/Backend/Modules/Partners/Actions/Edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public function execute(): void

if (!$widget instanceof Widget) {
$this->redirect(Model::createURLForAction('Index', null, null, ['error' => 'non-existing']));
return;
}

$editWidget = new UpdateWidget($widget);
Expand Down Expand Up @@ -47,5 +48,6 @@ public function execute(): void
]
)
);
return;
}
}

0 comments on commit 1a10186

Please sign in to comment.