Cleaning up unnecessary use of 'die' and 'exit'

This commit is contained in:
Dan Cryer 2015-02-12 12:37:56 +00:00
commit 489f71b8c2
13 changed files with 188 additions and 106 deletions

View file

@ -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;
}
}