Skip to content

Commit

Permalink
Remove blank lines of ID field in factory (#93)
Browse files Browse the repository at this point in the history
Remove blank line of ID field in factory
  • Loading branch information
cable8mm authored Jan 6, 2025
1 parent b46eb7d commit ce037ad
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Generators/FactoryGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ public function run(bool $force = false): void
$fakers = '';

foreach ($this->table->getColumns() as $column) {
$fakers .= FactoryGenerator::INTENT.$column->fake().PHP_EOL;
if (! empty($column->fake())) {
$fakers .= FactoryGenerator::INTENT.$column->fake().PHP_EOL;
}
}

$fakers = preg_replace('/\n$/', '', $fakers);
Expand Down

0 comments on commit ce037ad

Please sign in to comment.