Skip to content

Commit c9bd6dd

Browse files
committed
Tweak output formatting
1 parent 0d09f99 commit c9bd6dd

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/Generators/MigrationGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ protected function buildDefinition(Model $model)
5959
$definition .= '$table->timestamps();' . PHP_EOL;
6060
}
6161

62-
return $definition;
62+
return trim($definition);
6363
}
6464

6565
protected function getClassName(Model $model)

src/Generators/ModelGenerator.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,20 +36,20 @@ private function buildProperties(Model $model)
3636

3737
$property = $this->fillableColumns($model->columns());
3838
if (!empty($property)) {
39-
$properties .= str_replace('[]', $this->pretty_print_array($property, false), $this->propertyStub('fillable'));
39+
$properties .= PHP_EOL . str_replace('[]', $this->pretty_print_array($property, false), $this->propertyStub('fillable'));
4040
}
4141

4242
$property = $this->castableColumns($model->columns());
4343
if (!empty($property)) {
44-
$properties .= str_replace('[]', $this->pretty_print_array($property), $this->propertyStub('casts'));
44+
$properties .= PHP_EOL . str_replace('[]', $this->pretty_print_array($property), $this->propertyStub('casts'));
4545
}
4646

4747
$property = $this->dateColumns($model->columns());
4848
if (!empty($property)) {
49-
$properties .= str_replace('[]', $this->pretty_print_array($property, false), $this->propertyStub('dates'));
49+
$properties .= PHP_EOL . str_replace('[]', $this->pretty_print_array($property, false), $this->propertyStub('dates'));
5050
}
5151

52-
return $properties;
52+
return trim($properties);
5353
}
5454

5555
protected function getPath(Model $model)

0 commit comments

Comments
 (0)