@@ -34,7 +34,7 @@ |
||
| 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 | { |
@@ -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.')); |
@@ -33,7 +33,7 @@ |
||
| 33 | 33 | * @param array $options |
| 34 | 34 | * @return \Cake\ORM\Query |
| 35 | 35 | */ |
| 36 | - public function getTreeList(array $options = []) |
|
| 36 | + public function getTreeList(array $options = [ ]) |
|
| 37 | 37 | { |
| 38 | 38 | $options = Hash::merge([ |
| 39 | 39 | 'lft' => 'ASC', |
@@ -16,8 +16,8 @@ |
||
| 16 | 16 | use Cake\Routing\Router; |
| 17 | 17 | use Cake\Routing\RouteBuilder; |
| 18 | 18 | |
| 19 | -Router::plugin('Community', ['path' => '/'], function (RouteBuilder $routeBuilder) { |
|
| 20 | - $routeBuilder->prefix('admin', function (RouteBuilder $routeBuilder) { |
|
| 21 | - $routeBuilder->connect('/community/:controller/:action/*', []); |
|
| 19 | +Router::plugin('Community', [ 'path' => '/' ], function(RouteBuilder $routeBuilder) { |
|
| 20 | + $routeBuilder->prefix('admin', function(RouteBuilder $routeBuilder) { |
|
| 21 | + $routeBuilder->connect('/community/:controller/:action/*', [ ]); |
|
| 22 | 22 | }); |
| 23 | 23 | }); |