Skip to content

Commit

Permalink
Fix barryvdh#480 where tinyint is casts as bool (barryvdh#481)
Browse files Browse the repository at this point in the history
* Fix barryvdh#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
  • Loading branch information
jclee100 authored and barryvdh committed Apr 5, 2017
1 parent 75e1f22 commit d11bf58
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Console/ModelsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -347,15 +347,13 @@ protected function getPropertiesFromTable($model)
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;
Expand Down

0 comments on commit d11bf58

Please sign in to comment.