@@ -30,22 +30,22 @@ |
||
| 30 | 30 | $adapter = new ArraySource(); |
| 31 | 31 | $adapter->setSource( |
| 32 | 32 | [ |
| 33 | - ['id' => 1, 'name' => 'Foo', 'email' => '[email protected]', 'status' => 'active'], |
|
| 34 | - ['id' => 2, 'name' => 'Bar', 'email' => '[email protected]', 'status' => 'active'], |
|
| 35 | - ['id' => 3, 'name' => 'Foo 2', 'email' => '[email protected]', 'status' => 'disable'], |
|
| 36 | - ['id' => 4, 'name' => 'Foo 3', 'email' => '[email protected]', 'status' => 'disable'], |
|
| 37 | - ['id' => 5, 'name' => 'Foo 4', 'email' => '[email protected]', 'status' => 'disable'], |
|
| 38 | - ['id' => 6, 'name' => 'Foo 5', 'email' => '[email protected]', 'status' => 'disable'], |
|
| 39 | - ['id' => 7, 'name' => 'Foo 6', 'email' => '[email protected]', 'status' => 'disable'], |
|
| 40 | - ['id' => 8, 'name' => 'Foo 7', 'email' => '[email protected]', 'status' => 'disable'], |
|
| 41 | - ['id' => 9, 'name' => 'Foo 8', 'email' => '[email protected]', 'status' => 'disable'], |
|
| 42 | - ['id' => 10, 'name' => 'Foo 9', 'email' => '[email protected]', 'status' => 'disable'], |
|
| 33 | + [ 'id' => 1, 'name' => 'Foo', 'email' => '[email protected]', 'status' => 'active' ], |
|
| 34 | + [ 'id' => 2, 'name' => 'Bar', 'email' => '[email protected]', 'status' => 'active' ], |
|
| 35 | + [ 'id' => 3, 'name' => 'Foo 2', 'email' => '[email protected]', 'status' => 'disable' ], |
|
| 36 | + [ 'id' => 4, 'name' => 'Foo 3', 'email' => '[email protected]', 'status' => 'disable' ], |
|
| 37 | + [ 'id' => 5, 'name' => 'Foo 4', 'email' => '[email protected]', 'status' => 'disable' ], |
|
| 38 | + [ 'id' => 6, 'name' => 'Foo 5', 'email' => '[email protected]', 'status' => 'disable' ], |
|
| 39 | + [ 'id' => 7, 'name' => 'Foo 6', 'email' => '[email protected]', 'status' => 'disable' ], |
|
| 40 | + [ 'id' => 8, 'name' => 'Foo 7', 'email' => '[email protected]', 'status' => 'disable' ], |
|
| 41 | + [ 'id' => 9, 'name' => 'Foo 8', 'email' => '[email protected]', 'status' => 'disable' ], |
|
| 42 | + [ 'id' => 10, 'name' => 'Foo 9', 'email' => '[email protected]', 'status' => 'disable' ], |
|
| 43 | 43 | ] |
| 44 | 44 | ); |
| 45 | 45 | |
| 46 | 46 | $this->setAdapter($adapter); |
| 47 | 47 | $this->setDefaultLimit(3); |
| 48 | - $this->setAllowOrders(['name', 'email', 'id']); |
|
| 49 | - $this->setAllowFilters(['name', 'status', 'id']); |
|
| 48 | + $this->setAllowOrders([ 'name', 'email', 'id' ]); |
|
| 49 | + $this->setAllowFilters([ 'name', 'status', 'id' ]); |
|
| 50 | 50 | } |
| 51 | 51 | } |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | |
| 38 | 38 | $this->setAdapter($adapter); |
| 39 | 39 | $this->setDefaultLimit(15); |
| 40 | - $this->setAllowOrders(['name', 'id', 'status']); |
|
| 41 | - $this->setAllowFilters(['status', 'id']); |
|
| 40 | + $this->setAllowOrders([ 'name', 'id', 'status' ]); |
|
| 41 | + $this->setAllowFilters([ 'status', 'id' ]); |
|
| 42 | 42 | } |
| 43 | 43 | } |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | * |
| 26 | 26 | * @return mixed |
| 27 | 27 | */ |
| 28 | -return function () { |
|
| 28 | +return function() { |
|
| 29 | 29 | /** |
| 30 | 30 | * @var Controller $this |
| 31 | 31 | */ |
@@ -15,13 +15,13 @@ |
||
| 15 | 15 | public function run() |
| 16 | 16 | { |
| 17 | 17 | $prefix = bin2hex(random_bytes(4)); |
| 18 | - $data = []; |
|
| 18 | + $data = [ ]; |
|
| 19 | 19 | for ($i = 0; $i < 100; $i++) { |
| 20 | 20 | $name = uniqid($prefix); |
| 21 | - $data[] = [ |
|
| 21 | + $data[ ] = [ |
|
| 22 | 22 | 'name' => $name, |
| 23 | - 'email' => $name . '@localhost.com', |
|
| 24 | - 'status' => array_rand(['active' => 1, 'disable' => 2, 'delete' => 3]), |
|
| 23 | + 'email' => $name.'@localhost.com', |
|
| 24 | + 'status' => array_rand([ 'active' => 1, 'disable' => 2, 'delete' => 3 ]), |
|
| 25 | 25 | 'created' => date('Y-m-d H:i:s'), |
| 26 | 26 | ]; |
| 27 | 27 | } |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | /** |
| 13 | 13 | * @return false |
| 14 | 14 | */ |
| 15 | -return function () { |
|
| 15 | +return function() { |
|
| 16 | 16 | sleep(3); |
| 17 | 17 | return false; |
| 18 | 18 | }; |