@@ -62,7 +62,7 @@ |
||
62 | 62 | // unique validator |
63 | 63 | $this->addValidator( |
64 | 64 | 'key', |
65 | - v::callback(function () { |
|
65 | + v::callback(function() { |
|
66 | 66 | return !$this->getTable()->findRowWhere(['key' => $this->key, 'namespace' => $this->namespace]); |
67 | 67 | })->setError('Key name "{{input}}" already exists') |
68 | 68 | ); |
@@ -29,14 +29,14 @@ |
||
29 | 29 | */ |
30 | 30 | public function init() |
31 | 31 | { |
32 | - // Array |
|
33 | - $adapter = new \Bluz\Grid\Source\SqlSource(); |
|
34 | - $adapter->setSource('SELECT * FROM options'); |
|
32 | + // Array |
|
33 | + $adapter = new \Bluz\Grid\Source\SqlSource(); |
|
34 | + $adapter->setSource('SELECT * FROM options'); |
|
35 | 35 | |
36 | - $this->setAdapter($adapter); |
|
37 | - $this->setDefaultLimit(25); |
|
38 | - $this->setAllowOrders(['id', 'key', 'namespace', 'value', 'created', 'deleted']); |
|
36 | + $this->setAdapter($adapter); |
|
37 | + $this->setDefaultLimit(25); |
|
38 | + $this->setAllowOrders(['id', 'key', 'namespace', 'value', 'created', 'deleted']); |
|
39 | 39 | |
40 | - return $this; |
|
40 | + return $this; |
|
41 | 41 | } |
42 | 42 | } |
@@ -15,7 +15,7 @@ |
||
15 | 15 | * @privilege Management |
16 | 16 | * @return void |
17 | 17 | */ |
18 | -return function () { |
|
18 | +return function() { |
|
19 | 19 | /** |
20 | 20 | * @var Controller $this |
21 | 21 | */ |
@@ -23,7 +23,7 @@ |
||
23 | 23 | * @param array $data |
24 | 24 | * @return array |
25 | 25 | */ |
26 | -return function ($crud, $primary, $data) { |
|
26 | +return function($crud, $primary, $data) { |
|
27 | 27 | try { |
28 | 28 | $crud->createOne($data); |
29 | 29 |
@@ -15,7 +15,7 @@ |
||
15 | 15 | * @privilege Management |
16 | 16 | * @return void |
17 | 17 | */ |
18 | -return function () { |
|
18 | +return function() { |
|
19 | 19 | /** |
20 | 20 | * @var Controller $this |
21 | 21 | */ |