File tree Expand file tree Collapse file tree 1 file changed +11
-13
lines changed Expand file tree Collapse file tree 1 file changed +11
-13
lines changed Original file line number Diff line number Diff line change @@ -68,22 +68,20 @@ public function handle()
68
68
*/
69
69
private function getType ($ databaseType )
70
70
{
71
- if (strpos ($ databaseType , 'timestamp ' ) !== false ) {
72
- return 'string|\Illuminate\Support\Carbon ' ;
73
- }
71
+ switch (true ) {
72
+ case strpos ($ databaseType , 'char ' ) !== false :
73
+ case strpos ($ databaseType , 'text ' ) !== false :
74
+ return 'string ' ;
74
75
75
- if (strpos ($ databaseType , 'date ' ) !== false ) {
76
- return 'string|\Illuminate\Support\Carbon ' ;
77
- }
76
+ case strpos ($ databaseType , 'int ' ) !== false :
77
+ return 'int ' ;
78
78
79
- if ( strpos ($ databaseType , 'char ' ) !== false ) {
80
- return ' string ' ;
81
- }
79
+ case strpos ($ databaseType , 'timestamp ' ) !== false :
80
+ case strpos ( $ databaseType , ' date ' ) !== false :
81
+ return ' string|\Illuminate\Support\Carbon ' ;
82
82
83
- if ( strpos ( $ databaseType , ' int ' ) !== false ) {
84
- return ' int ' ;
83
+ default :
84
+ return $ databaseType ;
85
85
}
86
-
87
- return $ databaseType ;
88
86
}
89
87
}
You can’t perform that action at this time.
0 commit comments