File tree Expand file tree Collapse file tree 2 files changed +16
-5
lines changed
tests/Console/ModelsCommand/GeneratePhpdocWithMixin/__snapshots__ Expand file tree Collapse file tree 2 files changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -929,6 +929,13 @@ protected function createPhpDocs($class)
929
929
if (!$ phpdocMixin ->getText ()) {
930
930
$ mixinDocComment = preg_replace ("/\s\*\s* \n/ " , '' , $ mixinDocComment );
931
931
}
932
+
933
+ foreach ($ phpdoc ->getTagsByName ('mixin ' ) as $ tag ) {
934
+ if (Str::startsWith ($ tag ->getContent (), 'IdeHelper ' )) {
935
+ $ phpdoc ->deleteTag ($ tag );
936
+ }
937
+ }
938
+ $ docComment = $ serializer ->getDocComment ($ phpdoc );
932
939
}
933
940
934
941
if ($ this ->write ) {
@@ -950,11 +957,15 @@ protected function createPhpDocs($class)
950
957
}
951
958
952
959
$ classname = $ this ->write_mixin ? $ mixinClassName : $ classname ;
953
- $ output = "namespace {$ namespace }{ \n{$ docComment }\n\t{$ keyword }class {$ classname } extends \Eloquent " ;
960
+ $ output = "namespace {$ namespace }{ \n{$ docComment }\n\t{$ keyword }class {$ classname } " ;
961
+
962
+ if (!$ this ->write_mixin ) {
963
+ $ output .= "extends \Eloquent " ;
954
964
955
- if ($ interfaceNames ) {
956
- $ interfaces = implode (', \\' , $ interfaceNames );
957
- $ output .= "implements \\{$ interfaces } " ;
965
+ if ($ interfaceNames ) {
966
+ $ interfaces = implode (', \\' , $ interfaceNames );
967
+ $ output .= "implements \\{$ interfaces } " ;
968
+ }
958
969
}
959
970
960
971
return $ output . "{} \n} \n\n" ;
Original file line number Diff line number Diff line change @@ -183,6 +183,6 @@ class Post extends Model
183
183
* @method static \Illuminate\Database\Eloquent\Builder|Post whereYearNullable($value)
184
184
* @mixin \Eloquent
185
185
*/
186
- class IdeHelperPost extends \Eloquent {}
186
+ class IdeHelperPost {}
187
187
}
188
188
You can’t perform that action at this time.
0 commit comments