@@ -4,7 +4,7 @@ discard block |
||
| 4 | 4 | * @link https://github.com/bluzphp/skeleton |
| 5 | 5 | */ |
| 6 | 6 | |
| 7 | -declare(strict_types=1); |
|
| 7 | +declare(strict_types = 1); |
|
| 8 | 8 | |
| 9 | 9 | namespace Application\Test; |
| 10 | 10 | |
@@ -39,8 +39,8 @@ discard block |
||
| 39 | 39 | |
| 40 | 40 | $this->setAdapter($adapter); |
| 41 | 41 | $this->setDefaultLimit(15); |
| 42 | - $this->setAllowOrders(['name', 'id', 'status']); |
|
| 43 | - $this->setAllowFilters(['status', 'id']); |
|
| 42 | + $this->setAllowOrders([ 'name', 'id', 'status' ]); |
|
| 43 | + $this->setAllowFilters([ 'status', 'id' ]); |
|
| 44 | 44 | |
| 45 | 45 | return $this; |
| 46 | 46 | } |
@@ -4,7 +4,7 @@ discard block |
||
| 4 | 4 | * @link https://github.com/bluzphp/skeleton |
| 5 | 5 | */ |
| 6 | 6 | |
| 7 | -declare(strict_types=1); |
|
| 7 | +declare(strict_types = 1); |
|
| 8 | 8 | |
| 9 | 9 | namespace Application\Test; |
| 10 | 10 | |
@@ -32,23 +32,23 @@ discard block |
||
| 32 | 32 | $adapter = new ArraySource(); |
| 33 | 33 | $adapter->setSource( |
| 34 | 34 | [ |
| 35 | - ['id' => 1, 'name' => 'Foo', 'email' => '[email protected]', 'status' => 'active'], |
|
| 36 | - ['id' => 2, 'name' => 'Bar', 'email' => '[email protected]', 'status' => 'active'], |
|
| 37 | - ['id' => 3, 'name' => 'Foo 2', 'email' => '[email protected]', 'status' => 'disable'], |
|
| 38 | - ['id' => 4, 'name' => 'Foo 3', 'email' => '[email protected]', 'status' => 'disable'], |
|
| 39 | - ['id' => 5, 'name' => 'Foo 4', 'email' => '[email protected]', 'status' => 'disable'], |
|
| 40 | - ['id' => 6, 'name' => 'Foo 5', 'email' => '[email protected]', 'status' => 'disable'], |
|
| 41 | - ['id' => 7, 'name' => 'Foo 6', 'email' => '[email protected]', 'status' => 'disable'], |
|
| 42 | - ['id' => 8, 'name' => 'Foo 7', 'email' => '[email protected]', 'status' => 'disable'], |
|
| 43 | - ['id' => 9, 'name' => 'Foo 8', 'email' => '[email protected]', 'status' => 'disable'], |
|
| 44 | - ['id' => 10, 'name' => 'Foo 9', 'email' => '[email protected]', 'status' => 'disable'], |
|
| 35 | + [ 'id' => 1, 'name' => 'Foo', 'email' => '[email protected]', 'status' => 'active' ], |
|
| 36 | + [ 'id' => 2, 'name' => 'Bar', 'email' => '[email protected]', 'status' => 'active' ], |
|
| 37 | + [ 'id' => 3, 'name' => 'Foo 2', 'email' => '[email protected]', 'status' => 'disable' ], |
|
| 38 | + [ 'id' => 4, 'name' => 'Foo 3', 'email' => '[email protected]', 'status' => 'disable' ], |
|
| 39 | + [ 'id' => 5, 'name' => 'Foo 4', 'email' => '[email protected]', 'status' => 'disable' ], |
|
| 40 | + [ 'id' => 6, 'name' => 'Foo 5', 'email' => '[email protected]', 'status' => 'disable' ], |
|
| 41 | + [ 'id' => 7, 'name' => 'Foo 6', 'email' => '[email protected]', 'status' => 'disable' ], |
|
| 42 | + [ 'id' => 8, 'name' => 'Foo 7', 'email' => '[email protected]', 'status' => 'disable' ], |
|
| 43 | + [ 'id' => 9, 'name' => 'Foo 8', 'email' => '[email protected]', 'status' => 'disable' ], |
|
| 44 | + [ 'id' => 10, 'name' => 'Foo 9', 'email' => '[email protected]', 'status' => 'disable' ], |
|
| 45 | 45 | ] |
| 46 | 46 | ); |
| 47 | 47 | |
| 48 | 48 | $this->setAdapter($adapter); |
| 49 | 49 | $this->setDefaultLimit(3); |
| 50 | - $this->setAllowOrders(['name', 'email', 'id']); |
|
| 51 | - $this->setAllowFilters(['name', 'status', 'id']); |
|
| 50 | + $this->setAllowOrders([ 'name', 'email', 'id' ]); |
|
| 51 | + $this->setAllowFilters([ 'name', 'status', 'id' ]); |
|
| 52 | 52 | |
| 53 | 53 | return $this; |
| 54 | 54 | } |
@@ -4,7 +4,7 @@ |
||
| 4 | 4 | * @link https://github.com/bluzphp/skeleton |
| 5 | 5 | */ |
| 6 | 6 | |
| 7 | -declare(strict_types=1); |
|
| 7 | +declare(strict_types = 1); |
|
| 8 | 8 | |
| 9 | 9 | namespace Application\Test; |
| 10 | 10 | |
@@ -4,7 +4,7 @@ discard block |
||
| 4 | 4 | * @link https://github.com/bluzphp/skeleton |
| 5 | 5 | */ |
| 6 | 6 | |
| 7 | -declare(strict_types=1); |
|
| 7 | +declare(strict_types = 1); |
|
| 8 | 8 | |
| 9 | 9 | namespace Application\Test; |
| 10 | 10 | |
@@ -34,8 +34,8 @@ discard block |
||
| 34 | 34 | |
| 35 | 35 | $this->setAdapter($adapter); |
| 36 | 36 | $this->setDefaultLimit(15); |
| 37 | - $this->setAllowOrders(['name', 'id', 'status']); |
|
| 38 | - $this->setAllowFilters(['status', 'id']); |
|
| 37 | + $this->setAllowOrders([ 'name', 'id', 'status' ]); |
|
| 38 | + $this->setAllowFilters([ 'status', 'id' ]); |
|
| 39 | 39 | $this->setDefaultOrder('name', Grid::ORDER_DESC); |
| 40 | 40 | |
| 41 | 41 | return $this; |
@@ -4,7 +4,7 @@ discard block |
||
| 4 | 4 | * @link https://github.com/bluzphp/skeleton |
| 5 | 5 | */ |
| 6 | 6 | |
| 7 | -declare(strict_types=1); |
|
| 7 | +declare(strict_types = 1); |
|
| 8 | 8 | |
| 9 | 9 | namespace Application\Test; |
| 10 | 10 | |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | */ |
| 43 | 43 | public function saveTestRow() |
| 44 | 44 | { |
| 45 | - return self::insert(['name' => 'Example #' . random_int(1, 10), 'email' => '[email protected]']); |
|
| 45 | + return self::insert([ 'name' => 'Example #'.random_int(1, 10), 'email' => '[email protected]' ]); |
|
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | /** |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | */ |
| 53 | 53 | public function updateTestRows() |
| 54 | 54 | { |
| 55 | - return self::update(['email' => '[email protected]'], ['email' => '[email protected]']); |
|
| 55 | + return self::update([ 'email' => '[email protected]' ], [ 'email' => '[email protected]' ]); |
|
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | /** |
@@ -62,6 +62,6 @@ discard block |
||
| 62 | 62 | */ |
| 63 | 63 | public function deleteTestRows() |
| 64 | 64 | { |
| 65 | - return self::delete(['email' => '[email protected]']); |
|
| 65 | + return self::delete([ 'email' => '[email protected]' ]); |
|
| 66 | 66 | } |
| 67 | 67 | } |
@@ -11,12 +11,12 @@ |
||
| 11 | 11 | use Bluz\Proxy\EventManager; |
| 12 | 12 | use Bluz\Proxy\Logger; |
| 13 | 13 | |
| 14 | -return function () { |
|
| 14 | +return function() { |
|
| 15 | 15 | EventManager::attach( |
| 16 | 16 | 'testspace:initevent', |
| 17 | - function (Event $event) { |
|
| 17 | + function(Event $event) { |
|
| 18 | 18 | Logger::info('catch event'); |
| 19 | - Logger::info('event ' . $event->getName()); |
|
| 19 | + Logger::info('event '.$event->getName()); |
|
| 20 | 20 | } |
| 21 | 21 | ); |
| 22 | 22 | }; |
@@ -19,13 +19,13 @@ discard block |
||
| 19 | 19 | /** |
| 20 | 20 | * @return string |
| 21 | 21 | */ |
| 22 | -return function () { |
|
| 22 | +return function() { |
|
| 23 | 23 | /** |
| 24 | 24 | * @var Controller $this |
| 25 | 25 | */ |
| 26 | 26 | Layout::breadCrumbs( |
| 27 | 27 | [ |
| 28 | - Layout::ahref('Test', ['test', 'index']), |
|
| 28 | + Layout::ahref('Test', [ 'test', 'index' ]), |
|
| 29 | 29 | 'Cookies', |
| 30 | 30 | ] |
| 31 | 31 | ); |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | |
| 37 | 37 | // use Response object |
| 38 | 38 | Response::setCookie('response', 'call'); |
| 39 | - Response::setCookie('time', 'hour', time() + 3600); |
|
| 39 | + Response::setCookie('time', 'hour', time()+3600); |
|
| 40 | 40 | |
| 41 | 41 | $this->assign('title', 'Cookies'); |
| 42 | 42 | $this->assign('content', 'Check `hello` and `time` cookies'); |
@@ -20,13 +20,13 @@ discard block |
||
| 20 | 20 | * @return void |
| 21 | 21 | * @throws \Exception |
| 22 | 22 | */ |
| 23 | -return function ($id = null) { |
|
| 23 | +return function($id = null) { |
|
| 24 | 24 | /** |
| 25 | 25 | * @var Controller $this |
| 26 | 26 | */ |
| 27 | 27 | Layout::breadCrumbs( |
| 28 | 28 | [ |
| 29 | - Layout::ahref('Test', ['test', 'index']), |
|
| 29 | + Layout::ahref('Test', [ 'test', 'index' ]), |
|
| 30 | 30 | 'Cache', |
| 31 | 31 | 'Data', |
| 32 | 32 | ] |
@@ -45,9 +45,9 @@ discard block |
||
| 45 | 45 | /** |
| 46 | 46 | * @var Users\Row $userRow |
| 47 | 47 | */ |
| 48 | - if (!$userRow = Cache::get('user.' . $id)) { |
|
| 48 | + if (!$userRow = Cache::get('user.'.$id)) { |
|
| 49 | 49 | $userRow = Users\Table::findRow($id); |
| 50 | - Cache::set('user.' . $id, $userRow, 30); |
|
| 50 | + Cache::set('user.'.$id, $userRow, 30); |
|
| 51 | 51 | }; |
| 52 | 52 | |
| 53 | 53 | if (!$userRow) { |
@@ -14,10 +14,10 @@ |
||
| 14 | 14 | /** |
| 15 | 15 | * @return void |
| 16 | 16 | */ |
| 17 | -return function () { |
|
| 17 | +return function() { |
|
| 18 | 18 | Layout::breadCrumbs( |
| 19 | 19 | [ |
| 20 | - Layout::ahref('Test', ['test', 'index']), |
|
| 20 | + Layout::ahref('Test', [ 'test', 'index' ]), |
|
| 21 | 21 | 'Without view', |
| 22 | 22 | ] |
| 23 | 23 | ); |