diff --git a/src/Console/ModelsCommand.php b/src/Console/ModelsCommand.php index b9cdfe0..47257d5 100644 --- a/src/Console/ModelsCommand.php +++ b/src/Console/ModelsCommand.php @@ -584,6 +584,8 @@ class ModelsCommand extends Command 'float', 'real', 'float4', 'double', 'float8' => 'float', + 'decimal', 'numeric' => 'numeric', + default => 'string', }; } diff --git a/tests/Console/ModelsCommand/AllowGlobDirectory/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/AllowGlobDirectory/__snapshots__/Test__test__1.php index 2b17017..e6786cf 100644 --- a/tests/Console/ModelsCommand/AllowGlobDirectory/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/AllowGlobDirectory/__snapshots__/Test__test__1.php @@ -42,8 +42,8 @@ use Illuminate\Database\Eloquent\Model; * @property float $float_not_nullable * @property float|null $double_nullable * @property float $double_not_nullable - * @property string|null $decimal_nullable - * @property string $decimal_not_nullable + * @property numeric|null $decimal_nullable + * @property numeric $decimal_not_nullable * @property int|null $boolean_nullable * @property int $boolean_not_nullable * @property string|null $enum_nullable diff --git a/tests/Console/ModelsCommand/DoesNotGeneratePhpdocWithExternalEloquentBuilder/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/DoesNotGeneratePhpdocWithExternalEloquentBuilder/__snapshots__/Test__test__1.php index 54411a6..ca5b265 100644 --- a/tests/Console/ModelsCommand/DoesNotGeneratePhpdocWithExternalEloquentBuilder/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/DoesNotGeneratePhpdocWithExternalEloquentBuilder/__snapshots__/Test__test__1.php @@ -48,8 +48,8 @@ namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\DoesNotGenerateP * @property float $float_not_nullable * @property float|null $double_nullable * @property float $double_not_nullable - * @property string|null $decimal_nullable - * @property string $decimal_not_nullable + * @property numeric|null $decimal_nullable + * @property numeric $decimal_not_nullable * @property int|null $boolean_nullable * @property int $boolean_not_nullable * @property string|null $enum_nullable diff --git a/tests/Console/ModelsCommand/GenerateBasicPhpDocWithEnumDefaults/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/GenerateBasicPhpDocWithEnumDefaults/__snapshots__/Test__test__1.php index 46145aa..48f10e2 100644 --- a/tests/Console/ModelsCommand/GenerateBasicPhpDocWithEnumDefaults/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/GenerateBasicPhpDocWithEnumDefaults/__snapshots__/Test__test__1.php @@ -44,8 +44,8 @@ use Illuminate\Database\Eloquent\Model; * @property float $float_not_nullable * @property float|null $double_nullable * @property float $double_not_nullable - * @property string|null $decimal_nullable - * @property string $decimal_not_nullable + * @property numeric|null $decimal_nullable + * @property numeric $decimal_not_nullable * @property int|null $boolean_nullable * @property int $boolean_not_nullable * @property string|null $enum_nullable diff --git a/tests/Console/ModelsCommand/GenerateBasicPhpdoc/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/GenerateBasicPhpdoc/__snapshots__/Test__test__1.php index 5b12d69..41899c9 100644 --- a/tests/Console/ModelsCommand/GenerateBasicPhpdoc/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/GenerateBasicPhpdoc/__snapshots__/Test__test__1.php @@ -42,8 +42,8 @@ use Illuminate\Database\Eloquent\Model; * @property float $float_not_nullable * @property float|null $double_nullable * @property float $double_not_nullable - * @property string|null $decimal_nullable - * @property string $decimal_not_nullable + * @property numeric|null $decimal_nullable + * @property numeric $decimal_not_nullable * @property int|null $boolean_nullable * @property int $boolean_not_nullable * @property string|null $enum_nullable diff --git a/tests/Console/ModelsCommand/GenerateBasicPhpdocCamel/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/GenerateBasicPhpdocCamel/__snapshots__/Test__test__1.php index b041db7..1ddaa01 100644 --- a/tests/Console/ModelsCommand/GenerateBasicPhpdocCamel/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/GenerateBasicPhpdocCamel/__snapshots__/Test__test__1.php @@ -42,8 +42,8 @@ use Illuminate\Database\Eloquent\Model; * @property float $floatNotNullable * @property float|null $doubleNullable * @property float $doubleNotNullable - * @property string|null $decimalNullable - * @property string $decimalNotNullable + * @property numeric|null $decimalNullable + * @property numeric $decimalNotNullable * @property int|null $booleanNullable * @property int $booleanNotNullable * @property string|null $enumNullable diff --git a/tests/Console/ModelsCommand/GenerateBasicPhpdocFinal/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/GenerateBasicPhpdocFinal/__snapshots__/Test__test__1.php index 799c7ae..267388a 100644 --- a/tests/Console/ModelsCommand/GenerateBasicPhpdocFinal/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/GenerateBasicPhpdocFinal/__snapshots__/Test__test__1.php @@ -42,8 +42,8 @@ use Illuminate\Database\Eloquent\Model; * @property float $float_not_nullable * @property float|null $double_nullable * @property float $double_not_nullable - * @property string|null $decimal_nullable - * @property string $decimal_not_nullable + * @property numeric|null $decimal_nullable + * @property numeric $decimal_not_nullable * @property int|null $boolean_nullable * @property int $boolean_not_nullable * @property string|null $enum_nullable diff --git a/tests/Console/ModelsCommand/GeneratePhpdocWithExternalEloquentBuilder/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/GeneratePhpdocWithExternalEloquentBuilder/__snapshots__/Test__test__1.php index a194fd7..cd22c00 100644 --- a/tests/Console/ModelsCommand/GeneratePhpdocWithExternalEloquentBuilder/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/GeneratePhpdocWithExternalEloquentBuilder/__snapshots__/Test__test__1.php @@ -48,8 +48,8 @@ namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWi * @property float $float_not_nullable * @property float|null $double_nullable * @property float $double_not_nullable - * @property string|null $decimal_nullable - * @property string $decimal_not_nullable + * @property numeric|null $decimal_nullable + * @property numeric $decimal_not_nullable * @property int|null $boolean_nullable * @property int $boolean_not_nullable * @property string|null $enum_nullable diff --git a/tests/Console/ModelsCommand/GeneratePhpdocWithExternalEloquentBuilderWithFqn/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/GeneratePhpdocWithExternalEloquentBuilderWithFqn/__snapshots__/Test__test__1.php index 8683a31..6efda0e 100644 --- a/tests/Console/ModelsCommand/GeneratePhpdocWithExternalEloquentBuilderWithFqn/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/GeneratePhpdocWithExternalEloquentBuilderWithFqn/__snapshots__/Test__test__1.php @@ -43,8 +43,8 @@ use Illuminate\Database\Eloquent\Model; * @property float $float_not_nullable * @property float|null $double_nullable * @property float $double_not_nullable - * @property string|null $decimal_nullable - * @property string $decimal_not_nullable + * @property numeric|null $decimal_nullable + * @property numeric $decimal_not_nullable * @property int|null $boolean_nullable * @property int $boolean_not_nullable * @property string|null $enum_nullable diff --git a/tests/Console/ModelsCommand/GeneratePhpdocWithForcedFqn/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/GeneratePhpdocWithForcedFqn/__snapshots__/Test__test__1.php index b95c9da..a8006df 100644 --- a/tests/Console/ModelsCommand/GeneratePhpdocWithForcedFqn/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/GeneratePhpdocWithForcedFqn/__snapshots__/Test__test__1.php @@ -44,8 +44,8 @@ use Illuminate\Database\Eloquent\SoftDeletes; * @property float $float_not_nullable * @property float|null $double_nullable * @property float $double_not_nullable - * @property string|null $decimal_nullable - * @property string $decimal_not_nullable + * @property numeric|null $decimal_nullable + * @property numeric $decimal_not_nullable * @property int|null $boolean_nullable * @property int $boolean_not_nullable * @property string|null $enum_nullable diff --git a/tests/Console/ModelsCommand/GeneratePhpdocWithFqn/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/GeneratePhpdocWithFqn/__snapshots__/Test__test__1.php index b307b80..e1dc204 100644 --- a/tests/Console/ModelsCommand/GeneratePhpdocWithFqn/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/GeneratePhpdocWithFqn/__snapshots__/Test__test__1.php @@ -50,8 +50,8 @@ use Illuminate\Support\Carbon; * @property float $float_not_nullable * @property float|null $double_nullable * @property float $double_not_nullable - * @property string|null $decimal_nullable - * @property string $decimal_not_nullable + * @property numeric|null $decimal_nullable + * @property numeric $decimal_not_nullable * @property int|null $boolean_nullable * @property int $boolean_not_nullable * @property string|null $enum_nullable diff --git a/tests/Console/ModelsCommand/GeneratePhpdocWithFqnInExternalFile/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/GeneratePhpdocWithFqnInExternalFile/__snapshots__/Test__test__1.php index b076bb2..85556a0 100644 --- a/tests/Console/ModelsCommand/GeneratePhpdocWithFqnInExternalFile/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/GeneratePhpdocWithFqnInExternalFile/__snapshots__/Test__test__1.php @@ -48,8 +48,8 @@ namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWi * @property float $float_not_nullable * @property float|null $double_nullable * @property float $double_not_nullable - * @property string|null $decimal_nullable - * @property string $decimal_not_nullable + * @property numeric|null $decimal_nullable + * @property numeric $decimal_not_nullable * @property int|null $boolean_nullable * @property int $boolean_not_nullable * @property string|null $enum_nullable diff --git a/tests/Console/ModelsCommand/GeneratePhpdocWithMixin/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/GeneratePhpdocWithMixin/__snapshots__/Test__test__1.php index d6c9340..0aceca2 100644 --- a/tests/Console/ModelsCommand/GeneratePhpdocWithMixin/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/GeneratePhpdocWithMixin/__snapshots__/Test__test__1.php @@ -95,8 +95,8 @@ namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWi * @property float $float_not_nullable * @property float|null $double_nullable * @property float $double_not_nullable - * @property string|null $decimal_nullable - * @property string $decimal_not_nullable + * @property numeric|null $decimal_nullable + * @property numeric $decimal_not_nullable * @property int|null $boolean_nullable * @property int $boolean_not_nullable * @property string|null $enum_nullable diff --git a/tests/Console/ModelsCommand/MagicWhere/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/MagicWhere/__snapshots__/Test__test__1.php index e550fca..1338230 100644 --- a/tests/Console/ModelsCommand/MagicWhere/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/MagicWhere/__snapshots__/Test__test__1.php @@ -42,8 +42,8 @@ use Illuminate\Database\Eloquent\Model; * @property float $float_not_nullable * @property float|null $double_nullable * @property float $double_not_nullable - * @property string|null $decimal_nullable - * @property string $decimal_not_nullable + * @property numeric|null $decimal_nullable + * @property numeric $decimal_not_nullable * @property int|null $boolean_nullable * @property int $boolean_not_nullable * @property string|null $enum_nullable diff --git a/tests/Console/ModelsCommand/QueryScopes/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/QueryScopes/__snapshots__/Test__test__1.php index e6b2588..70cec8f 100644 --- a/tests/Console/ModelsCommand/QueryScopes/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/QueryScopes/__snapshots__/Test__test__1.php @@ -81,8 +81,8 @@ namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\QueryScopes\Mode * @property float $float_not_nullable * @property float|null $double_nullable * @property float $double_not_nullable - * @property string|null $decimal_nullable - * @property string $decimal_not_nullable + * @property numeric|null $decimal_nullable + * @property numeric $decimal_not_nullable * @property int|null $boolean_nullable * @property int $boolean_not_nullable * @property string|null $enum_nullable diff --git a/tests/Console/ModelsCommand/RelationCountProperties/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/RelationCountProperties/__snapshots__/Test__test__1.php index 48f72bf..651544c 100644 --- a/tests/Console/ModelsCommand/RelationCountProperties/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/RelationCountProperties/__snapshots__/Test__test__1.php @@ -43,8 +43,8 @@ use Illuminate\Database\Eloquent\Relations\HasMany; * @property float $float_not_nullable * @property float|null $double_nullable * @property float $double_not_nullable - * @property string|null $decimal_nullable - * @property string $decimal_not_nullable + * @property numeric|null $decimal_nullable + * @property numeric $decimal_not_nullable * @property int|null $boolean_nullable * @property int $boolean_not_nullable * @property string|null $enum_nullable