Skip to content

Commit

Permalink
Refactor column PHP type (#345)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tigrov authored Aug 9, 2024
1 parent 0d13a32 commit 58007d4
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions tests/Provider/SchemaProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public static function columns(): array
'int_col' => [
'type' => 'integer',
'dbType' => 'int(11)',
'phpType' => 'integer',
'phpType' => 'int',
'primaryKey' => false,
'allowNull' => false,
'autoIncrement' => false,
Expand All @@ -32,7 +32,7 @@ public static function columns(): array
'int_col2' => [
'type' => 'integer',
'dbType' => 'int(11)',
'phpType' => 'integer',
'phpType' => 'int',
'primaryKey' => false,
'allowNull' => true,
'autoIncrement' => false,
Expand All @@ -59,7 +59,7 @@ public static function columns(): array
'tinyint_col' => [
'type' => 'tinyint',
'dbType' => 'tinyint(3)',
'phpType' => 'integer',
'phpType' => 'int',
'primaryKey' => false,
'allowNull' => true,
'autoIncrement' => false,
Expand All @@ -72,7 +72,7 @@ public static function columns(): array
'smallint_col' => [
'type' => 'smallint',
'dbType' => 'smallint(1)',
'phpType' => 'integer',
'phpType' => 'int',
'primaryKey' => false,
'allowNull' => true,
'autoIncrement' => false,
Expand Down Expand Up @@ -137,7 +137,7 @@ public static function columns(): array
'float_col' => [
'type' => 'double',
'dbType' => 'double(4,3)',
'phpType' => 'double',
'phpType' => 'float',
'primaryKey' => false,
'allowNull' => false,
'autoIncrement' => false,
Expand All @@ -150,7 +150,7 @@ public static function columns(): array
'float_col2' => [
'type' => 'double',
'dbType' => 'double',
'phpType' => 'double',
'phpType' => 'float',
'primaryKey' => false,
'allowNull' => true,
'autoIncrement' => false,
Expand All @@ -163,7 +163,7 @@ public static function columns(): array
'blob_col' => [
'type' => 'binary',
'dbType' => 'blob',
'phpType' => 'resource',
'phpType' => 'mixed',
'primaryKey' => false,
'allowNull' => true,
'autoIncrement' => false,
Expand All @@ -176,7 +176,7 @@ public static function columns(): array
'numeric_col' => [
'type' => 'decimal',
'dbType' => 'decimal(5,2)',
'phpType' => 'double',
'phpType' => 'float',
'primaryKey' => false,
'allowNull' => true,
'autoIncrement' => false,
Expand All @@ -202,7 +202,7 @@ public static function columns(): array
'bool_col' => [
'type' => 'boolean',
'dbType' => 'bit(1)',
'phpType' => 'boolean',
'phpType' => 'bool',
'primaryKey' => false,
'allowNull' => false,
'autoIncrement' => false,
Expand All @@ -215,7 +215,7 @@ public static function columns(): array
'tiny_col' => [
'type' => 'tinyint',
'dbType' => 'tinyint(1)',
'phpType' => 'integer',
'phpType' => 'int',
'primaryKey' => false,
'allowNull' => true,
'autoIncrement' => false,
Expand All @@ -241,7 +241,7 @@ public static function columns(): array
'bit_col' => [
'type' => 'bit',
'dbType' => 'bit(8)',
'phpType' => 'integer',
'phpType' => 'int',
'primaryKey' => false,
'allowNull' => false,
'autoIncrement' => false,
Expand All @@ -254,7 +254,7 @@ public static function columns(): array
'json_col' => [
'type' => 'json',
'dbType' => 'json',
'phpType' => 'array',
'phpType' => 'mixed',
'primaryKey' => false,
'allowNull' => true,
'autoIncrement' => false,
Expand All @@ -272,7 +272,7 @@ public static function columns(): array
'id' => [
'type' => 'integer',
'dbType' => 'int(11)',
'phpType' => 'integer',
'phpType' => 'int',
'primaryKey' => true,
'allowNull' => false,
'autoIncrement' => true,
Expand Down Expand Up @@ -309,7 +309,7 @@ public static function columnsTypeBit(): array
'bit_col_1' => [
'type' => 'boolean',
'dbType' => 'bit(1)',
'phpType' => 'boolean',
'phpType' => 'bool',
'primaryKey' => false,
'allowNull' => false,
'autoIncrement' => false,
Expand All @@ -322,7 +322,7 @@ public static function columnsTypeBit(): array
'bit_col_2' => [
'type' => 'boolean',
'dbType' => 'bit(1)',
'phpType' => 'boolean',
'phpType' => 'bool',
'primaryKey' => false,
'allowNull' => true,
'autoIncrement' => false,
Expand All @@ -335,7 +335,7 @@ public static function columnsTypeBit(): array
'bit_col_3' => [
'type' => 'bit',
'dbType' => 'bit(32)',
'phpType' => 'integer',
'phpType' => 'int',
'primaryKey' => false,
'allowNull' => false,
'autoIncrement' => false,
Expand All @@ -348,7 +348,7 @@ public static function columnsTypeBit(): array
'bit_col_4' => [
'type' => 'bit',
'dbType' => 'bit(32)',
'phpType' => 'integer',
'phpType' => 'int',
'primaryKey' => false,
'allowNull' => true,
'autoIncrement' => false,
Expand All @@ -361,7 +361,7 @@ public static function columnsTypeBit(): array
'bit_col_5' => [
'type' => 'bit',
'dbType' => 'bit(64)',
'phpType' => 'integer',
'phpType' => 'int',
'primaryKey' => false,
'allowNull' => false,
'autoIncrement' => false,
Expand All @@ -374,7 +374,7 @@ public static function columnsTypeBit(): array
'bit_col_6' => [
'type' => 'bit',
'dbType' => 'bit(64)',
'phpType' => 'integer',
'phpType' => 'int',
'primaryKey' => false,
'allowNull' => true,
'autoIncrement' => false,
Expand Down

0 comments on commit 58007d4

Please sign in to comment.