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()
6868 */
6969 private function getType ($ databaseType )
7070 {
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 ' ;
7475
75- if (strpos ($ databaseType , 'date ' ) !== false ) {
76- return 'string|\Illuminate\Support\Carbon ' ;
77- }
76+ case strpos ($ databaseType , 'int ' ) !== false :
77+ return 'int ' ;
7878
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 ' ;
8282
83- if ( strpos ( $ databaseType , ' int ' ) !== false ) {
84- return ' int ' ;
83+ default :
84+ return $ databaseType ;
8585 }
86-
87- return $ databaseType ;
8886 }
8987}
You can’t perform that action at this time.
0 commit comments