@@ -59,8 +59,7 @@ discard block |
||
| 59 | 59 | * @class SessionFlashTag |
| 60 | 60 | * @package Platine\Framework\Template\Tag |
| 61 | 61 | */ |
| 62 | -class SessionFlashTag extends AbstractTag |
|
| 63 | -{ |
|
| 62 | +class SessionFlashTag extends AbstractTag { |
|
| 64 | 63 | |
| 65 | 64 | /** |
| 66 | 65 | * The key of the session |
@@ -71,8 +70,7 @@ discard block |
||
| 71 | 70 | /** |
| 72 | 71 | * {@inheritdoc} |
| 73 | 72 | */ |
| 74 | - public function __construct(string $markup, &$tokens, Parser $parser) |
|
| 75 | - { |
|
| 73 | + public function __construct(string $markup, &$tokens, Parser $parser) { |
|
| 76 | 74 | $lexer = new Lexer('/' . Token::QUOTED_FRAGMENT . '/'); |
| 77 | 75 | if ($lexer->match($markup)) { |
| 78 | 76 | $this->name = $lexer->getStringMatch(0); |
@@ -59,8 +59,7 @@ discard block |
||
| 59 | 59 | * @class RouteUrlTag |
| 60 | 60 | * @package Platine\Framework\Template\Tag |
| 61 | 61 | */ |
| 62 | -class RouteUrlTag extends AbstractTag |
|
| 63 | -{ |
|
| 62 | +class RouteUrlTag extends AbstractTag { |
|
| 64 | 63 | |
| 65 | 64 | /** |
| 66 | 65 | * The name of the route |
@@ -71,8 +70,7 @@ discard block |
||
| 71 | 70 | /** |
| 72 | 71 | * {@inheritdoc} |
| 73 | 72 | */ |
| 74 | - public function __construct(string $markup, &$tokens, Parser $parser) |
|
| 75 | - { |
|
| 73 | + public function __construct(string $markup, &$tokens, Parser $parser) { |
|
| 76 | 74 | $lexer = new Lexer('/' . Token::QUOTED_FRAGMENT . '/'); |
| 77 | 75 | if ($lexer->match($markup)) { |
| 78 | 76 | $this->name = $lexer->getStringMatch(0); |
@@ -10,18 +10,18 @@ |
||
| 10 | 10 | |
| 11 | 11 | public function up(): void |
| 12 | 12 | { |
| 13 | - //Action when migrate up |
|
| 13 | + //Action when migrate up |
|
| 14 | 14 | $this->alter('users', function (AlterTable $table) { |
| 15 | 15 | $table->string('role') |
| 16 | - ->description('The user role or function'); |
|
| 16 | + ->description('The user role or function'); |
|
| 17 | 17 | }); |
| 18 | 18 | } |
| 19 | 19 | |
| 20 | 20 | public function down(): void |
| 21 | 21 | { |
| 22 | - //Action when migrate down |
|
| 22 | + //Action when migrate down |
|
| 23 | 23 | $this->alter('users', function (AlterTable $table) { |
| 24 | - $table->dropColumn('role'); |
|
| 24 | + $table->dropColumn('role'); |
|
| 25 | 25 | }); |
| 26 | 26 | } |
| 27 | 27 | } |
@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | public function up(): void |
| 12 | 12 | { |
| 13 | 13 | //Action when migrate up |
| 14 | - $this->alter('users', function (AlterTable $table) { |
|
| 14 | + $this->alter('users', function(AlterTable $table) { |
|
| 15 | 15 | $table->string('role') |
| 16 | 16 | ->description('The user role or function'); |
| 17 | 17 | }); |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | public function down(): void |
| 21 | 21 | { |
| 22 | 22 | //Action when migrate down |
| 23 | - $this->alter('users', function (AlterTable $table) { |
|
| 23 | + $this->alter('users', function(AlterTable $table) { |
|
| 24 | 24 | $table->dropColumn('role'); |
| 25 | 25 | }); |
| 26 | 26 | } |
@@ -5,8 +5,7 @@ |
||
| 5 | 5 | use Platine\Database\Schema\AlterTable; |
| 6 | 6 | use Platine\Framework\Migration\AbstractMigration; |
| 7 | 7 | |
| 8 | -class AddUserRoleField20210720080304 extends AbstractMigration |
|
| 9 | -{ |
|
| 8 | +class AddUserRoleField20210720080304 extends AbstractMigration { |
|
| 10 | 9 | |
| 11 | 10 | public function up(): void |
| 12 | 11 | { |
@@ -10,39 +10,39 @@ discard block |
||
| 10 | 10 | |
| 11 | 11 | public function up(): void |
| 12 | 12 | { |
| 13 | - //Action when migrate up |
|
| 13 | + //Action when migrate up |
|
| 14 | 14 | $this->create('config', function (CreateTable $table) { |
| 15 | 15 | $table->integer('id') |
| 16 | - ->autoincrement() |
|
| 17 | - ->primary(); |
|
| 16 | + ->autoincrement() |
|
| 17 | + ->primary(); |
|
| 18 | 18 | $table->integer('parent_id') |
| 19 | - ->description('The parent config'); |
|
| 19 | + ->description('The parent config'); |
|
| 20 | 20 | $table->string('env') |
| 21 | - ->description('The config environment') |
|
| 22 | - ->index(); |
|
| 21 | + ->description('The config environment') |
|
| 22 | + ->index(); |
|
| 23 | 23 | $table->string('module') |
| 24 | - ->description('The module') |
|
| 25 | - ->index() |
|
| 26 | - ->notNull(); |
|
| 24 | + ->description('The module') |
|
| 25 | + ->index() |
|
| 26 | + ->notNull(); |
|
| 27 | 27 | $table->string('name') |
| 28 | - ->description('The config name') |
|
| 29 | - ->index(); |
|
| 28 | + ->description('The config name') |
|
| 29 | + ->index(); |
|
| 30 | 30 | $table->string('value') |
| 31 | - ->description('The config value'); |
|
| 31 | + ->description('The config value'); |
|
| 32 | 32 | $table->string('type') |
| 33 | - ->description('The config data type'); |
|
| 33 | + ->description('The config data type'); |
|
| 34 | 34 | $table->text('comment') |
| 35 | - ->description('The config description'); |
|
| 35 | + ->description('The config description'); |
|
| 36 | 36 | $table->integer('status') |
| 37 | - ->size('tiny') |
|
| 38 | - ->description('The config status') |
|
| 39 | - ->defaultValue(0) |
|
| 40 | - ->notNull(); |
|
| 37 | + ->size('tiny') |
|
| 38 | + ->description('The config status') |
|
| 39 | + ->defaultValue(0) |
|
| 40 | + ->notNull(); |
|
| 41 | 41 | $table->datetime('created_at') |
| 42 | - ->description('created date') |
|
| 43 | - ->notNull(); |
|
| 42 | + ->description('created date') |
|
| 43 | + ->notNull(); |
|
| 44 | 44 | $table->datetime('updated_at') |
| 45 | - ->description('updated date'); |
|
| 45 | + ->description('updated date'); |
|
| 46 | 46 | |
| 47 | 47 | $table->foreign('parent_id') |
| 48 | 48 | ->references('config', 'id') |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | |
| 55 | 55 | public function down(): void |
| 56 | 56 | { |
| 57 | - //Action when migrate down |
|
| 57 | + //Action when migrate down |
|
| 58 | 58 | $this->drop('config'); |
| 59 | 59 | } |
| 60 | 60 | } |
@@ -11,7 +11,7 @@ |
||
| 11 | 11 | public function up(): void |
| 12 | 12 | { |
| 13 | 13 | //Action when migrate up |
| 14 | - $this->create('config', function (CreateTable $table) { |
|
| 14 | + $this->create('config', function(CreateTable $table) { |
|
| 15 | 15 | $table->integer('id') |
| 16 | 16 | ->autoincrement() |
| 17 | 17 | ->primary(); |
@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | |
| 11 | 11 | public function up(): void |
| 12 | 12 | { |
| 13 | - //Action when migrate up |
|
| 13 | + //Action when migrate up |
|
| 14 | 14 | $this->create('permissions_roles', function (CreateTable $table) { |
| 15 | 15 | $table->integer('permission_id'); |
| 16 | 16 | $table->integer('role_id'); |
@@ -18,12 +18,12 @@ discard block |
||
| 18 | 18 | $table->primary(['permission_id', 'role_id']); |
| 19 | 19 | |
| 20 | 20 | $table->foreign('permission_id') |
| 21 | - ->references('permissions', 'id') |
|
| 22 | - ->onDelete('CASCADE'); |
|
| 21 | + ->references('permissions', 'id') |
|
| 22 | + ->onDelete('CASCADE'); |
|
| 23 | 23 | |
| 24 | 24 | $table->foreign('role_id') |
| 25 | - ->references('roles', 'id') |
|
| 26 | - ->onDelete('CASCADE'); |
|
| 25 | + ->references('roles', 'id') |
|
| 26 | + ->onDelete('CASCADE'); |
|
| 27 | 27 | |
| 28 | 28 | $table->engine('INNODB'); |
| 29 | 29 | }); |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | |
| 32 | 32 | public function down(): void |
| 33 | 33 | { |
| 34 | - //Action when migrate down |
|
| 34 | + //Action when migrate down |
|
| 35 | 35 | $this->drop('permissions_roles'); |
| 36 | 36 | } |
| 37 | 37 | } |
@@ -11,7 +11,7 @@ |
||
| 11 | 11 | public function up(): void |
| 12 | 12 | { |
| 13 | 13 | //Action when migrate up |
| 14 | - $this->create('permissions_roles', function (CreateTable $table) { |
|
| 14 | + $this->create('permissions_roles', function(CreateTable $table) { |
|
| 15 | 15 | $table->integer('permission_id'); |
| 16 | 16 | $table->integer('role_id'); |
| 17 | 17 | |
@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | |
| 11 | 11 | public function up(): void |
| 12 | 12 | { |
| 13 | - //Action when migrate up |
|
| 13 | + //Action when migrate up |
|
| 14 | 14 | $this->alter('users', function (AlterTable $table) { |
| 15 | 15 | $table->dropColumn('age'); |
| 16 | 16 | }); |
@@ -18,11 +18,11 @@ discard block |
||
| 18 | 18 | |
| 19 | 19 | public function down(): void |
| 20 | 20 | { |
| 21 | - //Action when migrate down |
|
| 21 | + //Action when migrate down |
|
| 22 | 22 | $this->alter('users', function (AlterTable $table) { |
| 23 | 23 | $table->integer('age') |
| 24 | - ->size('tiny') |
|
| 25 | - ->description('The user age'); |
|
| 24 | + ->size('tiny') |
|
| 25 | + ->description('The user age'); |
|
| 26 | 26 | }); |
| 27 | 27 | } |
| 28 | 28 | } |
@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | public function up(): void |
| 12 | 12 | { |
| 13 | 13 | //Action when migrate up |
| 14 | - $this->alter('users', function (AlterTable $table) { |
|
| 14 | + $this->alter('users', function(AlterTable $table) { |
|
| 15 | 15 | $table->dropColumn('age'); |
| 16 | 16 | }); |
| 17 | 17 | } |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | public function down(): void |
| 20 | 20 | { |
| 21 | 21 | //Action when migrate down |
| 22 | - $this->alter('users', function (AlterTable $table) { |
|
| 22 | + $this->alter('users', function(AlterTable $table) { |
|
| 23 | 23 | $table->integer('age') |
| 24 | 24 | ->size('tiny') |
| 25 | 25 | ->description('The user age'); |
@@ -5,8 +5,7 @@ |
||
| 5 | 5 | use Platine\Database\Schema\AlterTable; |
| 6 | 6 | use Platine\Framework\Migration\AbstractMigration; |
| 7 | 7 | |
| 8 | -class DropUserAgeField20210720080558 extends AbstractMigration |
|
| 9 | -{ |
|
| 8 | +class DropUserAgeField20210720080558 extends AbstractMigration { |
|
| 10 | 9 | |
| 11 | 10 | public function up(): void |
| 12 | 11 | { |
@@ -10,47 +10,47 @@ discard block |
||
| 10 | 10 | |
| 11 | 11 | public function up(): void |
| 12 | 12 | { |
| 13 | - //Action when migrate up |
|
| 13 | + //Action when migrate up |
|
| 14 | 14 | $this->create('users', function (CreateTable $table) { |
| 15 | 15 | $table->integer('id') |
| 16 | - ->autoincrement() |
|
| 17 | - ->primary(); |
|
| 16 | + ->autoincrement() |
|
| 17 | + ->primary(); |
|
| 18 | 18 | |
| 19 | 19 | $table->string('username') |
| 20 | - ->description('The user username') |
|
| 21 | - ->unique() |
|
| 22 | - ->notNull(); |
|
| 20 | + ->description('The user username') |
|
| 21 | + ->unique() |
|
| 22 | + ->notNull(); |
|
| 23 | 23 | |
| 24 | 24 | $table->string('email') |
| 25 | - ->description('The user email') |
|
| 26 | - ->unique() |
|
| 27 | - ->notNull(); |
|
| 25 | + ->description('The user email') |
|
| 26 | + ->unique() |
|
| 27 | + ->notNull(); |
|
| 28 | 28 | |
| 29 | 29 | $table->string('password') |
| 30 | - ->description('The user password') |
|
| 31 | - ->notNull(); |
|
| 30 | + ->description('The user password') |
|
| 31 | + ->notNull(); |
|
| 32 | 32 | |
| 33 | 33 | $table->integer('status') |
| 34 | - ->size('tiny') |
|
| 35 | - ->description('The user status') |
|
| 36 | - ->defaultValue(0); |
|
| 34 | + ->size('tiny') |
|
| 35 | + ->description('The user status') |
|
| 36 | + ->defaultValue(0); |
|
| 37 | 37 | |
| 38 | 38 | $table->integer('age') |
| 39 | - ->size('tiny') |
|
| 40 | - ->description('The user age'); |
|
| 39 | + ->size('tiny') |
|
| 40 | + ->description('The user age'); |
|
| 41 | 41 | |
| 42 | 42 | $table->string('lastname') |
| 43 | - ->description('The user lastname'); |
|
| 43 | + ->description('The user lastname'); |
|
| 44 | 44 | |
| 45 | 45 | $table->string('firstname') |
| 46 | - ->description('The user firstname'); |
|
| 46 | + ->description('The user firstname'); |
|
| 47 | 47 | |
| 48 | 48 | $table->datetime('created_at') |
| 49 | - ->description('created date') |
|
| 50 | - ->notNull(); |
|
| 49 | + ->description('created date') |
|
| 50 | + ->notNull(); |
|
| 51 | 51 | |
| 52 | 52 | $table->datetime('updated_at') |
| 53 | - ->description('last updated date'); |
|
| 53 | + ->description('last updated date'); |
|
| 54 | 54 | |
| 55 | 55 | $table->engine('INNODB'); |
| 56 | 56 | }); |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | |
| 59 | 59 | public function down(): void |
| 60 | 60 | { |
| 61 | - //Action when migrate down |
|
| 61 | + //Action when migrate down |
|
| 62 | 62 | $this->drop('users'); |
| 63 | 63 | } |
| 64 | 64 | } |
@@ -11,7 +11,7 @@ |
||
| 11 | 11 | public function up(): void |
| 12 | 12 | { |
| 13 | 13 | //Action when migrate up |
| 14 | - $this->create('users', function (CreateTable $table) { |
|
| 14 | + $this->create('users', function(CreateTable $table) { |
|
| 15 | 15 | $table->integer('id') |
| 16 | 16 | ->autoincrement() |
| 17 | 17 | ->primary(); |
@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | |
| 11 | 11 | public function up(): void |
| 12 | 12 | { |
| 13 | - //Action when migrate up |
|
| 13 | + //Action when migrate up |
|
| 14 | 14 | $this->create('roles_users', function (CreateTable $table) { |
| 15 | 15 | $table->integer('user_id'); |
| 16 | 16 | $table->integer('role_id'); |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | |
| 32 | 32 | public function down(): void |
| 33 | 33 | { |
| 34 | - //Action when migrate down |
|
| 34 | + //Action when migrate down |
|
| 35 | 35 | $this->drop('roles_users'); |
| 36 | 36 | } |
| 37 | 37 | } |
@@ -11,7 +11,7 @@ |
||
| 11 | 11 | public function up(): void |
| 12 | 12 | { |
| 13 | 13 | //Action when migrate up |
| 14 | - $this->create('roles_users', function (CreateTable $table) { |
|
| 14 | + $this->create('roles_users', function(CreateTable $table) { |
|
| 15 | 15 | $table->integer('user_id'); |
| 16 | 16 | $table->integer('role_id'); |
| 17 | 17 | |
@@ -10,24 +10,24 @@ discard block |
||
| 10 | 10 | |
| 11 | 11 | public function up(): void |
| 12 | 12 | { |
| 13 | - //Action when migrate up |
|
| 13 | + //Action when migrate up |
|
| 14 | 14 | $this->create('permissions', function (CreateTable $table) { |
| 15 | 15 | $table->integer('id') |
| 16 | - ->autoincrement() |
|
| 17 | - ->primary(); |
|
| 16 | + ->autoincrement() |
|
| 17 | + ->primary(); |
|
| 18 | 18 | $table->string('code') |
| 19 | - ->description('The permission code') |
|
| 20 | - ->unique() |
|
| 21 | - ->notNull(); |
|
| 19 | + ->description('The permission code') |
|
| 20 | + ->unique() |
|
| 21 | + ->notNull(); |
|
| 22 | 22 | $table->string('description') |
| 23 | - ->description('The permission description'); |
|
| 23 | + ->description('The permission description'); |
|
| 24 | 24 | $table->string('depend') |
| 25 | - ->description('The permission dependency'); |
|
| 25 | + ->description('The permission dependency'); |
|
| 26 | 26 | $table->datetime('created_at') |
| 27 | - ->description('permission created at') |
|
| 28 | - ->notNull(); |
|
| 27 | + ->description('permission created at') |
|
| 28 | + ->notNull(); |
|
| 29 | 29 | $table->datetime('updated_at') |
| 30 | - ->description('permission updated at'); |
|
| 30 | + ->description('permission updated at'); |
|
| 31 | 31 | |
| 32 | 32 | $table->engine('INNODB'); |
| 33 | 33 | }); |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | |
| 36 | 36 | public function down(): void |
| 37 | 37 | { |
| 38 | - //Action when migrate down |
|
| 38 | + //Action when migrate down |
|
| 39 | 39 | $this->drop('permissions'); |
| 40 | 40 | } |
| 41 | 41 | } |
@@ -11,7 +11,7 @@ |
||
| 11 | 11 | public function up(): void |
| 12 | 12 | { |
| 13 | 13 | //Action when migrate up |
| 14 | - $this->create('permissions', function (CreateTable $table) { |
|
| 14 | + $this->create('permissions', function(CreateTable $table) { |
|
| 15 | 15 | $table->integer('id') |
| 16 | 16 | ->autoincrement() |
| 17 | 17 | ->primary(); |