Skip to content

Commit 5e293d2

Browse files
author
Ni Nelli
committed
style: minor fixes
refs: #203
1 parent 48d2b8c commit 5e293d2

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Generators/ModelGenerator.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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 {

tests/Support/Model/ModelMockTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public function mockFilesystem(array $models = []): void
1313
{
1414
$fileSystemMock = new FileSystemMock;
1515

16-
if (!empty ($models)) {
16+
if (!empty($models)) {
1717
$fileSystemMock->models = $models;
1818
} else {
1919
$fileSystemMock->models = [

0 commit comments

Comments
 (0)