@@ -17,7 +17,7 @@ |
||
17 | 17 | * @param bool $flag |
18 | 18 | * @return array |
19 | 19 | */ |
20 | -return function ($flag = false) { |
|
20 | +return function($flag = false) { |
|
21 | 21 | /** |
22 | 22 | * @var Controller $this |
23 | 23 | */ |
@@ -22,7 +22,7 @@ |
||
22 | 22 | * @route /test-reflection.html |
23 | 23 | * @return array |
24 | 24 | */ |
25 | -return function ($id = 0, $other = "default value") { |
|
25 | +return function($id = 0, $other = "default value") { |
|
26 | 26 | /** |
27 | 27 | * @var Controller $this |
28 | 28 | */ |
@@ -14,7 +14,7 @@ |
||
14 | 14 | /** |
15 | 15 | * @return void |
16 | 16 | */ |
17 | -return function () { |
|
17 | +return function() { |
|
18 | 18 | /** |
19 | 19 | * @var Controller $this |
20 | 20 | */ |
@@ -18,7 +18,7 @@ |
||
18 | 18 | * @return void |
19 | 19 | * @throws \Exception |
20 | 20 | */ |
21 | -return function ($id = null) { |
|
21 | +return function($id = null) { |
|
22 | 22 | /** |
23 | 23 | * @var Controller $this |
24 | 24 | */ |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | /** |
18 | 18 | * @return array |
19 | 19 | */ |
20 | -return function () { |
|
20 | +return function() { |
|
21 | 21 | /** |
22 | 22 | * @var Controller $this |
23 | 23 | */ |
@@ -30,35 +30,35 @@ discard block |
||
30 | 30 | |
31 | 31 | EventManager::attach( |
32 | 32 | 'testevent', |
33 | - function (Event $event) { |
|
33 | + function(Event $event) { |
|
34 | 34 | return $event->getTarget()*2; |
35 | 35 | } |
36 | 36 | ); |
37 | 37 | |
38 | 38 | EventManager::attach( |
39 | 39 | 'testevent', |
40 | - function (Event $event) { |
|
40 | + function(Event $event) { |
|
41 | 41 | return $event->getTarget()*2; |
42 | 42 | } |
43 | 43 | ); |
44 | 44 | |
45 | 45 | EventManager::attach( |
46 | 46 | 'testspace:event', |
47 | - function (Event $event) { |
|
47 | + function(Event $event) { |
|
48 | 48 | return $event->getTarget()+4; |
49 | 49 | } |
50 | 50 | ); |
51 | 51 | |
52 | 52 | EventManager::attach( |
53 | 53 | 'testspace:event', |
54 | - function (Event $event) { |
|
54 | + function(Event $event) { |
|
55 | 55 | return $event->getTarget()+2; |
56 | 56 | } |
57 | 57 | ); |
58 | 58 | |
59 | 59 | EventManager::attach( |
60 | 60 | 'testspace:event2', |
61 | - function (Event $event) { |
|
61 | + function(Event $event) { |
|
62 | 62 | $event->setTarget($event->getTarget()+5); |
63 | 63 | return false; |
64 | 64 | } |
@@ -66,14 +66,14 @@ discard block |
||
66 | 66 | |
67 | 67 | EventManager::attach( |
68 | 68 | 'testspace:event2', |
69 | - function (Event $event) { |
|
69 | + function(Event $event) { |
|
70 | 70 | echo "Never run".$event->getName(); |
71 | 71 | } |
72 | 72 | ); |
73 | 73 | |
74 | 74 | EventManager::attach( |
75 | 75 | 'testspace', |
76 | - function (Event $event) { |
|
76 | + function(Event $event) { |
|
77 | 77 | return $event->getTarget()+1; |
78 | 78 | } |
79 | 79 | ); |
@@ -37,9 +37,9 @@ |
||
37 | 37 | { |
38 | 38 | $table = $this->table('test'); |
39 | 39 | $table |
40 | - ->addColumn('name', 'string', ['length' => 255]) |
|
41 | - ->addColumn('email', 'string', ['length' => 255, 'null' => true]) |
|
42 | - ->addColumn('status', 'enum', ['values' => ['active', 'disable', 'delete']]) |
|
40 | + ->addColumn('name', 'string', [ 'length' => 255 ]) |
|
41 | + ->addColumn('email', 'string', [ 'length' => 255, 'null' => true ]) |
|
42 | + ->addColumn('status', 'enum', [ 'values' => [ 'active', 'disable', 'delete' ] ]) |
|
43 | 43 | ->addTimestamps('created', 'updated') |
44 | 44 | ->create(); |
45 | 45 |
@@ -16,7 +16,7 @@ |
||
16 | 16 | /** |
17 | 17 | * @return string |
18 | 18 | */ |
19 | -return function () { |
|
19 | +return function() { |
|
20 | 20 | /** |
21 | 21 | * @var Controller $this |
22 | 22 | */ |
@@ -16,7 +16,7 @@ |
||
16 | 16 | /** |
17 | 17 | * @return array |
18 | 18 | */ |
19 | -return function () { |
|
19 | +return function() { |
|
20 | 20 | /** |
21 | 21 | * @var Controller $this |
22 | 22 | */ |
@@ -15,12 +15,12 @@ |
||
15 | 15 | public function run() |
16 | 16 | { |
17 | 17 | $faker = Faker\Factory::create(); |
18 | - $data = []; |
|
18 | + $data = [ ]; |
|
19 | 19 | for ($i = 0; $i < 100; $i++) { |
20 | - $data[] = [ |
|
20 | + $data[ ] = [ |
|
21 | 21 | 'name' => $faker->userName, |
22 | 22 | 'email' => $faker->email, |
23 | - 'status' => array_rand(['active' => 1, 'disable' => 2, 'delete' => 3]), |
|
23 | + 'status' => array_rand([ 'active' => 1, 'disable' => 2, 'delete' => 3 ]), |
|
24 | 24 | 'created' => date('Y-m-d H:i:s'), |
25 | 25 | ]; |
26 | 26 | } |