@@ -553,7 +553,7 @@ public function getPropertiesFromTable($model)
553553 $ this ->setMethod (
554554 Str::camel ('where_ ' . $ name ),
555555 $ this ->getClassNameInDestinationFile ($ model , $ builderClass )
556- . '| '
556+ . '<static> | '
557557 . $ this ->getClassNameInDestinationFile ($ model , get_class ($ model )),
558558 ['$value ' ]
559559 );
@@ -632,14 +632,14 @@ public function getPropertiesFromMethods($model)
632632 new ReflectionClass ($ model ),
633633 get_class ($ model )
634634 );
635- $ this ->setMethod ($ name , $ builder . '| ' . $ modelName , $ args , $ comment );
635+ $ this ->setMethod ($ name , $ builder . '<static> | ' . $ modelName , $ args , $ comment );
636636 }
637637 } elseif (in_array ($ method , ['query ' , 'newQuery ' , 'newModelQuery ' ])) {
638638 $ builder = $ this ->getClassNameInDestinationFile ($ model , get_class ($ model ->newModelQuery ()));
639639
640640 $ this ->setMethod (
641641 $ method ,
642- $ builder . '| ' . $ this ->getClassNameInDestinationFile ($ model , get_class ($ model ))
642+ $ builder . '<static> | ' . $ this ->getClassNameInDestinationFile ($ model , get_class ($ model ))
643643 );
644644
645645 if ($ this ->write_model_external_builder_methods ) {
@@ -905,7 +905,7 @@ public function getMethodType(Model $model, string $classType)
905905 {
906906 $ modelName = $ this ->getClassNameInDestinationFile ($ model , get_class ($ model ));
907907 $ builder = $ this ->getClassNameInDestinationFile ($ model , $ classType );
908- return $ builder . '| ' . $ modelName ;
908+ return $ builder . '<static> | ' . $ modelName ;
909909 }
910910
911911 /**
@@ -1320,9 +1320,9 @@ protected function getSoftDeleteMethods($model)
13201320 if (in_array ('Illuminate \\Database \\Eloquent \\SoftDeletes ' , $ traits )) {
13211321 $ modelName = $ this ->getClassNameInDestinationFile ($ model , get_class ($ model ));
13221322 $ builder = $ this ->getClassNameInDestinationFile ($ model , \Illuminate \Database \Eloquent \Builder::class);
1323- $ this ->setMethod ('withTrashed ' , $ builder . '| ' . $ modelName , []);
1324- $ this ->setMethod ('withoutTrashed ' , $ builder . '| ' . $ modelName , []);
1325- $ this ->setMethod ('onlyTrashed ' , $ builder . '| ' . $ modelName , []);
1323+ $ this ->setMethod ('withTrashed ' , $ builder . '<static> | ' . $ modelName , []);
1324+ $ this ->setMethod ('withoutTrashed ' , $ builder . '<static> | ' . $ modelName , []);
1325+ $ this ->setMethod ('onlyTrashed ' , $ builder . '<static> | ' . $ modelName , []);
13261326 }
13271327 }
13281328
@@ -1526,7 +1526,7 @@ protected function writeModelExternalBuilderMethods(Model $model): void
15261526
15271527 $ this ->setMethod (
15281528 $ builderMethod ,
1529- $ builderClassBasedOnFQCNOption . '| ' . $ this ->getClassNameInDestinationFile ($ model , get_class ($ model )),
1529+ $ builderClassBasedOnFQCNOption . '<static> | ' . $ this ->getClassNameInDestinationFile ($ model , get_class ($ model )),
15301530 $ args
15311531 );
15321532 }
0 commit comments