PHPMD Fixes
This commit is contained in:
parent
2f859be369
commit
af90b94a3c
|
@ -53,11 +53,11 @@ class GroupController extends Controller
|
||||||
$this->view->groups = $groups;
|
$this->view->groups = $groups;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function edit($id = null)
|
public function edit($groupId = null)
|
||||||
{
|
{
|
||||||
$this->requireAdmin();
|
$this->requireAdmin();
|
||||||
|
|
||||||
if (!is_null($id)) {
|
if (!is_null($groupId)) {
|
||||||
$group = $this->groupStore->getById($id);
|
$group = $this->groupStore->getById($id);
|
||||||
} else {
|
} else {
|
||||||
$group = new ProjectGroup();
|
$group = new ProjectGroup();
|
||||||
|
@ -74,7 +74,7 @@ class GroupController extends Controller
|
||||||
|
|
||||||
$form = new Form();
|
$form = new Form();
|
||||||
$form->setMethod('POST');
|
$form->setMethod('POST');
|
||||||
$form->setAction(PHPCI_URL . 'group/edit' . (!is_null($id) ? '/' . $id : ''));
|
$form->setAction(PHPCI_URL . 'group/edit' . (!is_null($groupId) ? '/' . $groupId : ''));
|
||||||
|
|
||||||
$title = new Form\Element\Text('title');
|
$title = new Form\Element\Text('title');
|
||||||
$title->setContainerClass('form-group');
|
$title->setContainerClass('form-group');
|
||||||
|
@ -91,10 +91,10 @@ class GroupController extends Controller
|
||||||
$this->view->form = $form;
|
$this->view->form = $form;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function delete($id)
|
public function delete($groupId)
|
||||||
{
|
{
|
||||||
$this->requireAdmin();
|
$this->requireAdmin();
|
||||||
$group = $this->groupStore->getById($id);
|
$group = $this->groupStore->getById($groupId);
|
||||||
|
|
||||||
$this->groupStore->delete($group);
|
$this->groupStore->delete($group);
|
||||||
$response = new b8\Http\Response\RedirectResponse();
|
$response = new b8\Http\Response\RedirectResponse();
|
||||||
|
|
Loading…
Reference in a new issue