Skip to content

Commit

Permalink
Apply php-cs-fixer changes
Browse files Browse the repository at this point in the history
  • Loading branch information
christophrumpel authored and actions-user committed Jun 21, 2020
1 parent 0e7a45f commit a585b92
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/BaseFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public function with(string $relatedModelClass, string $relationshipName, int $t
$clone->relatedModelFactories = clone $clone->relatedModelFactories;
$clone->relatedModelFactories[$relationshipName] ??= collect();
$clone->relatedModelFactories[$relationshipName] = $clone->relatedModelFactories[$relationshipName]->merge(
collect()->times($times, fn() => $this->getFactoryFromClassName($relatedModelClass))
collect()->times($times, fn () => $this->getFactoryFromClassName($relatedModelClass))
);

return $clone;
Expand Down Expand Up @@ -120,7 +120,7 @@ private function buildRelationsForModel(Model $model, string $creationType): Mod

if (method_exists($relation, 'associate')) {
$relatedModels = $factories->map->$creationType();
$relatedModels->each(fn($related) => $relation->associate($related));
$relatedModels->each(fn ($related) => $relation->associate($related));

if ($creationType === 'create') {
$model->save();
Expand Down

0 comments on commit a585b92

Please sign in to comment.