@@ -34,29 +34,29 @@ public function handle(): void
3434 $ this ->setArguments ();
3535 $ columns = $ this ->getAllColumnsInTable ($ this ->tableName );
3636
37- $ this ->checkEmpty ($ columns ,$ this ->tableName );
37+ $ this ->checkEmpty ($ columns , $ this ->tableName );
3838
3939 $ enums = [];
4040 foreach ($ columns as $ _column ) {
4141 if ($ _column ->DATA_TYPE == 'enum ' ) {
42- $ enumClassName = Str::studly (Str::singular (ucfirst (Str::camel ($ _column ->TABLE_NAME ))) . '_ ' . $ _column ->COLUMN_NAME ). "Enum " ;
42+ $ enumClassName = Str::studly (Str::singular (ucfirst (Str::camel ($ _column ->TABLE_NAME ))) . '_ ' . $ _column ->COLUMN_NAME ) . "Enum " ;
4343 $ enums [$ enumClassName ] = array_filter (explode (', ' , str_replace (['enum( ' , '\'' , ') ' ], ['' , '' , '' ], $ _column ->COLUMN_TYPE )));
44- $ filenameWithPath = $ this ->relativeEnumsPath . $ enumClassName. '.php ' ;
45- $ this ->checkDelete ($ filenameWithPath ,$ enumClassName ,"Enum " );
44+ $ filenameWithPath = $ this ->relativeEnumsPath . $ enumClassName . '.php ' ;
45+ $ this ->checkDelete ($ filenameWithPath , $ enumClassName , "Enum " );
4646 }
4747 }
4848
49- $ attributeStub = file_get_contents ($ this ->enumStubPath . 'attribute.stub ' );
49+ $ attributeStub = file_get_contents ($ this ->enumStubPath . 'attribute.stub ' );
5050
5151 foreach ($ enums as $ enumName => $ enum ) {
52- $ filenameWithPath = $ this ->relativeEnumsPath . $ enumName. '.php ' ;
52+ $ filenameWithPath = $ this ->relativeEnumsPath . $ enumName . '.php ' ;
5353
5454 $ this ->checkDirectory ($ this ->enumNamespace );
55- $ this ->checkClassExist ($ this ->relativeEnumsPath ,$ enumName ,"Enum " );
55+ $ this ->checkClassExist ($ this ->relativeEnumsPath , $ enumName , "Enum " );
5656
57- $ enumCreator = new CreatorEnum ($ columns ,$ attributeStub ,$ enum ,$ enumName ,$ this ->enumNamespace );
57+ $ enumCreator = new CreatorEnum ($ columns , $ attributeStub , $ enum , $ enumName , $ this ->enumNamespace );
5858 $ creator = new BaseCreator ($ enumCreator );
59- $ baseContent = $ creator ->createClass ($ filenameWithPath ,$ this );
59+ $ baseContent = $ creator ->createClass ($ filenameWithPath , $ this );
6060
6161 $ this ->finalized ($ filenameWithPath , $ enumName , $ baseContent );
6262 }
0 commit comments