@@ -92,7 +92,7 @@ public function prepareRelatedModels(): void
9292 'entity ' => $ this ->model ,
9393 ]);
9494
95- // TODO: use ronasit/larabuilder instead
95+ // TODO: use ronasit/larabuilder instead regexp
9696 $ fixedContent = preg_replace ('/\}$/ ' , "\n {$ newRelation }\n} " , $ content );
9797
9898 $ this ->insertPropertyAnnotation ($ fixedContent , $ this ->getRelationType ($ this ->model , $ types [$ type ]), $ relationName );
@@ -114,7 +114,7 @@ protected function insertImport(string &$classContent, string $import): void
114114 $ import = "use {$ import }; " ;
115115
116116 if (!Str::contains ($ classContent , $ import )) {
117- // TODO: use ronasit/larabuilder instead
117+ // TODO: use ronasit/larabuilder instead regexp
118118 $ classContent = preg_replace ('/(namespace\s+[^;]+;\s*)/ ' , "$1 {$ import }\n" , $ classContent , 1 );
119119 }
120120 }
@@ -271,7 +271,7 @@ protected function insertPropertyAnnotation(string &$content, string $propertyDa
271271 {
272272 $ annotation = "* @property {$ propertyDataType } \${$ propertyName }" ;
273273
274- // TODO: use ronasit/larabuilder instead
274+ // TODO: use ronasit/larabuilder instead regexp
275275 if (!Str::contains ($ content , '/** ' )) {
276276 $ content = preg_replace ('/^\s*class.*\n/m ' , "\n/** \n {$ annotation }\n */$0 " , $ content );
277277 } else {
0 commit comments