Cleaning up unnecessary use of 'die' and 'exit'
This commit is contained in:
parent
36e3c622c8
commit
489f71b8c2
13 changed files with 188 additions and 106 deletions
|
|
@ -175,8 +175,9 @@ class UserController extends Controller
|
|||
|
||||
$this->userService->createUser($name, $email, $password, $isAdmin);
|
||||
|
||||
header('Location: '.PHPCI_URL.'user');
|
||||
die;
|
||||
$response = new b8\Http\Response\RedirectResponse();
|
||||
$response->setHeader('Location', PHPCI_URL . 'user');
|
||||
return $response;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -215,8 +216,9 @@ class UserController extends Controller
|
|||
|
||||
$this->userService->updateUser($user, $name, $email, $password, $isAdmin);
|
||||
|
||||
header('Location: '.PHPCI_URL.'user');
|
||||
die;
|
||||
$response = new b8\Http\Response\RedirectResponse();
|
||||
$response->setHeader('Location', PHPCI_URL . 'user');
|
||||
return $response;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -288,7 +290,8 @@ class UserController extends Controller
|
|||
|
||||
$this->userService->deleteUser($user);
|
||||
|
||||
header('Location: '.PHPCI_URL.'user');
|
||||
die;
|
||||
$response = new b8\Http\Response\RedirectResponse();
|
||||
$response->setHeader('Location', PHPCI_URL . 'user');
|
||||
return $response;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue