@@ -26,8 +26,8 @@ |
||
26 | 26 | protected string $name; |
27 | 27 | |
28 | 28 | /** |
29 | - * {@inheritdoc} |
|
30 | - */ |
|
29 | + * {@inheritdoc} |
|
30 | + */ |
|
31 | 31 | public function __construct(string $markup, &$tokens, Parser $parser) |
32 | 32 | { |
33 | 33 | $lexer = new Lexer('/' . Token::QUOTED_FRAGMENT . '/'); |
@@ -15,8 +15,7 @@ discard block |
||
15 | 15 | * |
16 | 16 | * @author tony |
17 | 17 | */ |
18 | -class SessionFlashTag extends AbstractTag |
|
19 | -{ |
|
18 | +class SessionFlashTag extends AbstractTag { |
|
20 | 19 | |
21 | 20 | /** |
22 | 21 | * The key of the session |
@@ -27,8 +26,7 @@ discard block |
||
27 | 26 | /** |
28 | 27 | * {@inheritdoc} |
29 | 28 | */ |
30 | - public function __construct(string $markup, &$tokens, Parser $parser) |
|
31 | - { |
|
29 | + public function __construct(string $markup, &$tokens, Parser $parser) { |
|
32 | 30 | $lexer = new Lexer('/' . Token::QUOTED_FRAGMENT . '/'); |
33 | 31 | if ($lexer->match($markup)) { |
34 | 32 | $this->name = $lexer->getStringMatch(0); |
@@ -54,8 +54,7 @@ |
||
54 | 54 | * class AppServiceProvider |
55 | 55 | * @package Platine\Framework |
56 | 56 | */ |
57 | -class AppServiceProvider extends ServiceProvider |
|
58 | -{ |
|
57 | +class AppServiceProvider extends ServiceProvider { |
|
59 | 58 | |
60 | 59 | /** |
61 | 60 | * {@inheritdoc} |
@@ -3,6 +3,6 @@ |
||
3 | 3 | use Platine\Framework\Demo\Action\HomeAction; |
4 | 4 | use Platine\Route\Router; |
5 | 5 | |
6 | -return [static function (Router $router): void { |
|
6 | +return [static function(Router $router): void { |
|
7 | 7 | $router->get('/', HomeAction::class, 'home'); |
8 | 8 | }]; |
@@ -55,8 +55,7 @@ |
||
55 | 55 | * class AuthServiceProvider |
56 | 56 | * @package Platine\Framework\Service\Provider |
57 | 57 | */ |
58 | -class AuthServiceProvider extends ServiceProvider |
|
59 | -{ |
|
58 | +class AuthServiceProvider extends ServiceProvider { |
|
60 | 59 | |
61 | 60 | /** |
62 | 61 | * {@inheritdoc} |
@@ -53,15 +53,13 @@ |
||
53 | 53 | * class RedirectResponse |
54 | 54 | * @package Platine\Framework\Http\Response |
55 | 55 | */ |
56 | -class RedirectResponse extends Response |
|
57 | -{ |
|
56 | +class RedirectResponse extends Response { |
|
58 | 57 | |
59 | 58 | /** |
60 | 59 | * Create new instance |
61 | 60 | * @param string $url |
62 | 61 | */ |
63 | - public function __construct(string $url = '/') |
|
64 | - { |
|
62 | + public function __construct(string $url = '/') { |
|
65 | 63 | parent::__construct(302); |
66 | 64 | $this->headers['Location'] = [$url]; |
67 | 65 | } |
@@ -54,8 +54,7 @@ |
||
54 | 54 | * class TemplateResponse |
55 | 55 | * @package Platine\Framework\Http\Response |
56 | 56 | */ |
57 | -class TemplateResponse extends Response |
|
58 | -{ |
|
57 | +class TemplateResponse extends Response { |
|
59 | 58 | |
60 | 59 | protected Template $template; |
61 | 60 |
@@ -9,32 +9,32 @@ |
||
9 | 9 | |
10 | 10 | public function up(): void |
11 | 11 | { |
12 | - //Action when migrate up |
|
13 | - $this->create('permissions', function (CreateTable $table) { |
|
14 | - $table->integer('id') |
|
15 | - ->autoincrement() |
|
16 | - ->primary(); |
|
17 | - $table->string('code') |
|
18 | - ->description('The permission code') |
|
19 | - ->unique() |
|
20 | - ->notNull(); |
|
21 | - $table->string('description') |
|
22 | - ->description('The permission description'); |
|
23 | - $table->string('depend') |
|
24 | - ->description('The permission dependency'); |
|
25 | - $table->datetime('created_at') |
|
26 | - ->description('permission created at') |
|
27 | - ->notNull(); |
|
28 | - $table->datetime('updated_at') |
|
29 | - ->description('permission updated at'); |
|
12 | + //Action when migrate up |
|
13 | + $this->create('permissions', function (CreateTable $table) { |
|
14 | + $table->integer('id') |
|
15 | + ->autoincrement() |
|
16 | + ->primary(); |
|
17 | + $table->string('code') |
|
18 | + ->description('The permission code') |
|
19 | + ->unique() |
|
20 | + ->notNull(); |
|
21 | + $table->string('description') |
|
22 | + ->description('The permission description'); |
|
23 | + $table->string('depend') |
|
24 | + ->description('The permission dependency'); |
|
25 | + $table->datetime('created_at') |
|
26 | + ->description('permission created at') |
|
27 | + ->notNull(); |
|
28 | + $table->datetime('updated_at') |
|
29 | + ->description('permission updated at'); |
|
30 | 30 | |
31 | - $table->engine('INNODB'); |
|
32 | - }); |
|
31 | + $table->engine('INNODB'); |
|
32 | + }); |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | public function down(): void |
36 | 36 | { |
37 | - //Action when migrate down |
|
38 | - $this->drop('permissions'); |
|
37 | + //Action when migrate down |
|
38 | + $this->drop('permissions'); |
|
39 | 39 | } |
40 | 40 | } |
41 | 41 | \ No newline at end of file |
@@ -10,7 +10,7 @@ |
||
10 | 10 | public function up(): void |
11 | 11 | { |
12 | 12 | //Action when migrate up |
13 | - $this->create('permissions', function (CreateTable $table) { |
|
13 | + $this->create('permissions', function(CreateTable $table) { |
|
14 | 14 | $table->integer('id') |
15 | 15 | ->autoincrement() |
16 | 16 | ->primary(); |
@@ -4,8 +4,7 @@ |
||
4 | 4 | use Platine\Database\Schema\CreateTable; |
5 | 5 | use Platine\Framework\Migration\AbstractMigration; |
6 | 6 | |
7 | -class AddPermissionsTable20210717094547 extends AbstractMigration |
|
8 | -{ |
|
7 | +class AddPermissionsTable20210717094547 extends AbstractMigration { |
|
9 | 8 | |
10 | 9 | public function up(): void |
11 | 10 | { |
@@ -9,55 +9,55 @@ |
||
9 | 9 | |
10 | 10 | public function up(): void |
11 | 11 | { |
12 | - //Action when migrate up |
|
13 | - $this->create('users', function (CreateTable $table) { |
|
14 | - $table->integer('id') |
|
15 | - ->autoincrement() |
|
16 | - ->primary(); |
|
17 | - |
|
18 | - $table->string('username') |
|
19 | - ->description('The user username') |
|
20 | - ->unique() |
|
21 | - ->notNull(); |
|
22 | - |
|
23 | - $table->string('email') |
|
24 | - ->description('The user email') |
|
25 | - ->unique() |
|
26 | - ->notNull(); |
|
27 | - |
|
28 | - $table->string('password') |
|
29 | - ->description('The user password') |
|
30 | - ->notNull(); |
|
31 | - |
|
32 | - $table->integer('status') |
|
33 | - ->size('tiny') |
|
34 | - ->description('The user status') |
|
35 | - ->defaultValue(0); |
|
36 | - |
|
37 | - $table->integer('age') |
|
38 | - ->size('tiny') |
|
39 | - ->description('The user age'); |
|
40 | - |
|
41 | - $table->string('lastname') |
|
42 | - ->description('The user lastname'); |
|
43 | - |
|
44 | - $table->string('firstname') |
|
45 | - ->description('The user firstname'); |
|
46 | - |
|
47 | - $table->datetime('created_at') |
|
48 | - ->description('created date') |
|
49 | - ->notNull(); |
|
50 | - |
|
51 | - $table->datetime('updated_at') |
|
52 | - ->description('last updated date'); |
|
12 | + //Action when migrate up |
|
13 | + $this->create('users', function (CreateTable $table) { |
|
14 | + $table->integer('id') |
|
15 | + ->autoincrement() |
|
16 | + ->primary(); |
|
17 | + |
|
18 | + $table->string('username') |
|
19 | + ->description('The user username') |
|
20 | + ->unique() |
|
21 | + ->notNull(); |
|
22 | + |
|
23 | + $table->string('email') |
|
24 | + ->description('The user email') |
|
25 | + ->unique() |
|
26 | + ->notNull(); |
|
27 | + |
|
28 | + $table->string('password') |
|
29 | + ->description('The user password') |
|
30 | + ->notNull(); |
|
31 | + |
|
32 | + $table->integer('status') |
|
33 | + ->size('tiny') |
|
34 | + ->description('The user status') |
|
35 | + ->defaultValue(0); |
|
36 | + |
|
37 | + $table->integer('age') |
|
38 | + ->size('tiny') |
|
39 | + ->description('The user age'); |
|
40 | + |
|
41 | + $table->string('lastname') |
|
42 | + ->description('The user lastname'); |
|
43 | + |
|
44 | + $table->string('firstname') |
|
45 | + ->description('The user firstname'); |
|
46 | + |
|
47 | + $table->datetime('created_at') |
|
48 | + ->description('created date') |
|
49 | + ->notNull(); |
|
50 | + |
|
51 | + $table->datetime('updated_at') |
|
52 | + ->description('last updated date'); |
|
53 | 53 | |
54 | - $table->engine('INNODB'); |
|
55 | - }); |
|
54 | + $table->engine('INNODB'); |
|
55 | + }); |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | public function down(): void |
59 | 59 | { |
60 | - //Action when migrate down |
|
61 | - $this->drop('users'); |
|
60 | + //Action when migrate down |
|
61 | + $this->drop('users'); |
|
62 | 62 | } |
63 | 63 | } |
64 | 64 | \ No newline at end of file |
@@ -10,7 +10,7 @@ |
||
10 | 10 | public function up(): void |
11 | 11 | { |
12 | 12 | //Action when migrate up |
13 | - $this->create('users', function (CreateTable $table) { |
|
13 | + $this->create('users', function(CreateTable $table) { |
|
14 | 14 | $table->integer('id') |
15 | 15 | ->autoincrement() |
16 | 16 | ->primary(); |
@@ -4,8 +4,7 @@ |
||
4 | 4 | use Platine\Database\Schema\CreateTable; |
5 | 5 | use Platine\Framework\Migration\AbstractMigration; |
6 | 6 | |
7 | -class AddUsersTable20210705065248 extends AbstractMigration |
|
8 | -{ |
|
7 | +class AddUsersTable20210705065248 extends AbstractMigration { |
|
9 | 8 | |
10 | 9 | public function up(): void |
11 | 10 | { |
@@ -9,28 +9,28 @@ |
||
9 | 9 | |
10 | 10 | public function up(): void |
11 | 11 | { |
12 | - //Action when migrate up |
|
13 | - $this->create('permissions_roles', function (CreateTable $table) { |
|
14 | - $table->integer('permission_id'); |
|
15 | - $table->integer('role_id'); |
|
12 | + //Action when migrate up |
|
13 | + $this->create('permissions_roles', function (CreateTable $table) { |
|
14 | + $table->integer('permission_id'); |
|
15 | + $table->integer('role_id'); |
|
16 | 16 | |
17 | - $table->primary(['permission_id', 'role_id']); |
|
17 | + $table->primary(['permission_id', 'role_id']); |
|
18 | 18 | |
19 | - $table->foreign('permission_id') |
|
20 | - ->references('permissions', 'id') |
|
21 | - ->onDelete('CASCADE'); |
|
19 | + $table->foreign('permission_id') |
|
20 | + ->references('permissions', 'id') |
|
21 | + ->onDelete('CASCADE'); |
|
22 | 22 | |
23 | - $table->foreign('role_id') |
|
24 | - ->references('roles', 'id') |
|
25 | - ->onDelete('CASCADE'); |
|
23 | + $table->foreign('role_id') |
|
24 | + ->references('roles', 'id') |
|
25 | + ->onDelete('CASCADE'); |
|
26 | 26 | |
27 | - $table->engine('INNODB'); |
|
28 | - }); |
|
27 | + $table->engine('INNODB'); |
|
28 | + }); |
|
29 | 29 | } |
30 | 30 | |
31 | 31 | public function down(): void |
32 | 32 | { |
33 | - //Action when migrate down |
|
34 | - $this->drop('permissions_roles'); |
|
33 | + //Action when migrate down |
|
34 | + $this->drop('permissions_roles'); |
|
35 | 35 | } |
36 | 36 | } |
37 | 37 | \ No newline at end of file |
@@ -10,7 +10,7 @@ |
||
10 | 10 | public function up(): void |
11 | 11 | { |
12 | 12 | //Action when migrate up |
13 | - $this->create('permissions_roles', function (CreateTable $table) { |
|
13 | + $this->create('permissions_roles', function(CreateTable $table) { |
|
14 | 14 | $table->integer('permission_id'); |
15 | 15 | $table->integer('role_id'); |
16 | 16 |
@@ -4,8 +4,7 @@ |
||
4 | 4 | use Platine\Database\Schema\CreateTable; |
5 | 5 | use Platine\Framework\Migration\AbstractMigration; |
6 | 6 | |
7 | -class AddPermissionRolesTable20210717094822 extends AbstractMigration |
|
8 | -{ |
|
7 | +class AddPermissionRolesTable20210717094822 extends AbstractMigration { |
|
9 | 8 | |
10 | 9 | public function up(): void |
11 | 10 | { |