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 May 11, 2020
1 parent db43025 commit 07d5023
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/BaseFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ protected function build(array $extra = [], string $creationType = 'create')

public function times(int $times = 1): MultiFactoryCollection
{
return new MultiFactoryCollection(collect()->times($times, function() {
return new MultiFactoryCollection(collect()->times($times, function () {
return clone $this;
}));
}
Expand All @@ -67,7 +67,7 @@ public function with(string $relatedModelClass, string $relationshipName, int $t
{
$clone = clone $this;

$clone->relatedModelFactories = collect()->times($times, fn() => $this->getFactoryFromClassName($relatedModelClass));
$clone->relatedModelFactories = collect()->times($times, fn () => $this->getFactoryFromClassName($relatedModelClass));

$clone->relatedModelRelationshipName = $relationshipName;

Expand Down
3 changes: 2 additions & 1 deletion src/MultiFactoryCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@

use Illuminate\Support\Collection;

class MultiFactoryCollection {
class MultiFactoryCollection
{
protected Collection $factories;

public function __construct(Collection $factories)
Expand Down
2 changes: 1 addition & 1 deletion tests/FactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ public function it_lets_you_add_related_models_when_creating_multiple()

$this->assertCount(3, $groups);
$this->assertCount(15, Recipe::all());
$groups->each(function(Group $group) {
$groups->each(function (Group $group) {
$this->assertCount(5, $group->recipes);
});
}
Expand Down

0 comments on commit 07d5023

Please sign in to comment.