@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | /** |
| 35 | 35 | * Edit action. |
| 36 | 36 | * |
| 37 | - * @return mixed |
|
| 37 | + * @return \Cake\Network\Response|null |
|
| 38 | 38 | */ |
| 39 | 39 | public function add() |
| 40 | 40 | { |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | * Move down group action. |
| 61 | 61 | * |
| 62 | 62 | * @param int $id |
| 63 | - * @return \Cake\Http\Response|null |
|
| 63 | + * @return \Cake\Network\Response|null |
|
| 64 | 64 | */ |
| 65 | 65 | public function down($id) |
| 66 | 66 | { |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | * Edit action. |
| 72 | 72 | * |
| 73 | 73 | * @param int $id |
| 74 | - * @return \Cake\Http\Response|null |
|
| 74 | + * @return \Cake\Network\Response|null |
|
| 75 | 75 | */ |
| 76 | 76 | public function edit($id) |
| 77 | 77 | { |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | /** |
| 126 | 126 | * Process action. |
| 127 | 127 | * |
| 128 | - * @return \Cake\Http\Response|null |
|
| 128 | + * @return \Cake\Network\Response|null |
|
| 129 | 129 | */ |
| 130 | 130 | public function process() |
| 131 | 131 | { |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | * Move up group action. |
| 138 | 138 | * |
| 139 | 139 | * @param int $id |
| 140 | - * @return \Cake\Http\Response|null |
|
| 140 | + * @return \Cake\Network\Response|null |
|
| 141 | 141 | * @SuppressWarnings(PHPMD.ShortMethodName) |
| 142 | 142 | */ |
| 143 | 143 | public function up($id) |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | if ($result = $this->Groups->save($group)) { |
| 45 | 45 | $this->Flash->success(__d('community', 'The group has been saved.')); |
| 46 | 46 | return $this->App->redirect([ |
| 47 | - 'apply' => ['action' => 'edit', $result->id], |
|
| 47 | + 'apply' => [ 'action' => 'edit', $result->id ], |
|
| 48 | 48 | ]); |
| 49 | 49 | } else { |
| 50 | 50 | $this->Flash->error(__d('community', 'The group could not be saved. Please, try again.')); |
@@ -76,13 +76,13 @@ discard block |
||
| 76 | 76 | public function edit($id) |
| 77 | 77 | { |
| 78 | 78 | /** @var Group $group */ |
| 79 | - $group = $this->Groups->get($id, ['contain' => []]); |
|
| 80 | - if ($this->request->is(['patch', 'post', 'put'])) { |
|
| 79 | + $group = $this->Groups->get($id, [ 'contain' => [ ] ]); |
|
| 80 | + if ($this->request->is([ 'patch', 'post', 'put' ])) { |
|
| 81 | 81 | $group = $this->Groups->patchEntity($group, $this->request->data); |
| 82 | 82 | if ($result = $this->Groups->save($group)) { |
| 83 | 83 | $this->Flash->success(__d('community', 'The group has been updated.')); |
| 84 | 84 | return $this->App->redirect([ |
| 85 | - 'apply' => ['action' => 'edit', $result->id] |
|
| 85 | + 'apply' => [ 'action' => 'edit', $result->id ] |
|
| 86 | 86 | ]); |
| 87 | 87 | } else { |
| 88 | 88 | $this->Flash->error(__d('community', 'The group could not be updated. Please, try again.')); |