From d11bf580846bd511a806ab16e4de1e89afb87b54 Mon Sep 17 00:00:00 2001 From: JC Lee Date: Wed, 5 Apr 2017 15:45:19 +0800 Subject: [PATCH] Fix #480 where tinyint is casts as bool (#481) * Fix #480 where tinyint is casts as bool `tinyint` is classified by bool as doctrine/dbal, but it should not be so in our use case. `tinyint` is better PHPDoc'ed as int. If the user wants bool, he should use Eloquent's `$casts` property to do that. * Pass PSR-2 check * Remove comment as requested --- src/Console/ModelsCommand.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Console/ModelsCommand.php b/src/Console/ModelsCommand.php index 6794c69..019e5c6 100644 --- a/src/Console/ModelsCommand.php +++ b/src/Console/ModelsCommand.php @@ -347,15 +347,13 @@ class ModelsCommand extends Command case 'integer': case 'bigint': case 'smallint': + case 'boolean': $type = 'integer'; break; case 'decimal': case 'float': $type = 'float'; break; - case 'boolean': - $type = 'boolean'; - break; default: $type = 'mixed'; break;