Skip to content

Commit 6a80e2d

Browse files
committed
chore: fix php-cs-fixer
1 parent 0e5cafa commit 6a80e2d

File tree

5 files changed

+53
-53
lines changed

5 files changed

+53
-53
lines changed

api/src/DataFixtures/Factory/BookFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ protected function initialize(): static
8383
{
8484
return $this
8585
->afterInstantiate(function (Book $book): void {
86-
if ($book->author !== null) {
86+
if (null !== $book->author) {
8787
return;
8888
}
8989

api/src/DataFixtures/Factory/BookmarkFactory.php

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,23 @@
1414
use function Zenstruck\Foundry\lazy;
1515

1616
/**
17-
* @method Bookmark|Proxy create(array|callable $attributes = [])
18-
* @method static Bookmark|Proxy createOne(array $attributes = [])
19-
* @method static Bookmark|Proxy find(object|array|mixed $criteria)
20-
* @method static Bookmark|Proxy findOrCreate(array $attributes)
21-
* @method static Bookmark|Proxy first(string $sortedField = 'id')
22-
* @method static Bookmark|Proxy last(string $sortedField = 'id')
23-
* @method static Bookmark|Proxy random(array $attributes = [])
24-
* @method static Bookmark|Proxy randomOrCreate(array $attributes = [])
25-
* @method static Bookmark[]|Proxy[] all()
26-
* @method static Bookmark[]|Proxy[] createMany(int $number, array|callable $attributes = [])
27-
* @method static Bookmark[]|Proxy[] createSequence((iterable|callable) $sequence)
28-
* @method static Bookmark[]|Proxy[] findBy(array $attributes)
29-
* @method static Bookmark[]|Proxy[] randomRange(int $min, int $max, array $attributes = [])
30-
* @method static Bookmark[]|Proxy[] randomSet(int $number, array $attributes = [])
31-
* @method FactoryCollection<Bookmark|Proxy> many(int $min, int|null $max = null)
32-
* @method FactoryCollection<Bookmark|Proxy> sequence(iterable|callable $sequence)
33-
* @method static ProxyRepositoryDecorator<Bookmark, BookmarkRepository> repository()
17+
* @method Bookmark|Proxy create(array|callable $attributes = [])
18+
* @method static Bookmark|Proxy createOne(array $attributes = [])
19+
* @method static Bookmark|Proxy find(object|array|mixed $criteria)
20+
* @method static Bookmark|Proxy findOrCreate(array $attributes)
21+
* @method static Bookmark|Proxy first(string $sortedField = 'id')
22+
* @method static Bookmark|Proxy last(string $sortedField = 'id')
23+
* @method static Bookmark|Proxy random(array $attributes = [])
24+
* @method static Bookmark|Proxy randomOrCreate(array $attributes = [])
25+
* @method static Bookmark[]|Proxy[] all()
26+
* @method static Bookmark[]|Proxy[] createMany(int $number, array|callable $attributes = [])
27+
* @method static Bookmark[]|Proxy[] createSequence((iterable|callable) $sequence)
28+
* @method static Bookmark[]|Proxy[] findBy(array $attributes)
29+
* @method static Bookmark[]|Proxy[] randomRange(int $min, int $max, array $attributes = [])
30+
* @method static Bookmark[]|Proxy[] randomSet(int $number, array $attributes = [])
31+
* @method FactoryCollection<Bookmark|Proxy> many(int $min, int|null $max = null)
32+
* @method FactoryCollection<Bookmark|Proxy> sequence(iterable|callable $sequence)
33+
* @method static ProxyRepositoryDecorator<Bookmark, BookmarkRepository> repository()
3434
*
3535
* @phpstan-method Bookmark&Proxy<Bookmark> create(array|callable $attributes = [])
3636
* @phpstan-method static Bookmark&Proxy<Bookmark> createOne(array $attributes = [])

api/src/DataFixtures/Factory/ReviewFactory.php

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,23 @@
1515
use function Zenstruck\Foundry\lazy;
1616

1717
/**
18-
* @method Review|Proxy create(array|callable $attributes = [])
19-
* @method static Review|Proxy createOne(array $attributes = [])
20-
* @method static Review|Proxy find(object|array|mixed $criteria)
21-
* @method static Review|Proxy findOrCreate(array $attributes)
22-
* @method static Review|Proxy first(string $sortedField = 'id')
23-
* @method static Review|Proxy last(string $sortedField = 'id')
24-
* @method static Review|Proxy random(array $attributes = [])
25-
* @method static Review|Proxy randomOrCreate(array $attributes = [])
26-
* @method static Review[]|Proxy[] all()
27-
* @method static Review[]|Proxy[] createMany(int $number, array|callable $attributes = [])
28-
* @method static Review[]|Proxy[] createSequence((iterable|callable) $sequence)
29-
* @method static Review[]|Proxy[] findBy(array $attributes)
30-
* @method static Review[]|Proxy[] randomRange(int $min, int $max, array $attributes = [])
31-
* @method static Review[]|Proxy[] randomSet(int $number, array $attributes = [])
32-
* @method FactoryCollection<Review|Proxy> many(int $min, int|null $max = null)
33-
* @method FactoryCollection<Review|Proxy> sequence(iterable|callable $sequence)
34-
* @method static ProxyRepositoryDecorator<Review, ReviewRepository> repository()
18+
* @method Review|Proxy create(array|callable $attributes = [])
19+
* @method static Review|Proxy createOne(array $attributes = [])
20+
* @method static Review|Proxy find(object|array|mixed $criteria)
21+
* @method static Review|Proxy findOrCreate(array $attributes)
22+
* @method static Review|Proxy first(string $sortedField = 'id')
23+
* @method static Review|Proxy last(string $sortedField = 'id')
24+
* @method static Review|Proxy random(array $attributes = [])
25+
* @method static Review|Proxy randomOrCreate(array $attributes = [])
26+
* @method static Review[]|Proxy[] all()
27+
* @method static Review[]|Proxy[] createMany(int $number, array|callable $attributes = [])
28+
* @method static Review[]|Proxy[] createSequence((iterable|callable) $sequence)
29+
* @method static Review[]|Proxy[] findBy(array $attributes)
30+
* @method static Review[]|Proxy[] randomRange(int $min, int $max, array $attributes = [])
31+
* @method static Review[]|Proxy[] randomSet(int $number, array $attributes = [])
32+
* @method FactoryCollection<Review|Proxy> many(int $min, int|null $max = null)
33+
* @method FactoryCollection<Review|Proxy> sequence(iterable|callable $sequence)
34+
* @method static ProxyRepositoryDecorator<Review, ReviewRepository> repository()
3535
*
3636
* @phpstan-method Review&Proxy<Review> create(array|callable $attributes = [])
3737
* @phpstan-method static Review&Proxy<Review> createOne(array $attributes = [])

api/src/DataFixtures/Factory/UserFactory.php

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,23 @@
1212
use Zenstruck\Foundry\Persistence\ProxyRepositoryDecorator;
1313

1414
/**
15-
* @method User|Proxy create(array|callable $attributes = [])
16-
* @method static User|Proxy createOne(array $attributes = [])
17-
* @method static User|Proxy find(object|array|mixed $criteria)
18-
* @method static User|Proxy findOrCreate(array $attributes)
19-
* @method static User|Proxy first(string $sortedField = 'id')
20-
* @method static User|Proxy last(string $sortedField = 'id')
21-
* @method static User|Proxy random(array $attributes = [])
22-
* @method static User|Proxy randomOrCreate(array $attributes = [])
23-
* @method static User[]|Proxy[] all()
24-
* @method static User[]|Proxy[] createMany(int $number, array|callable $attributes = [])
25-
* @method static User[]|Proxy[] createSequence((iterable|callable) $sequence)
26-
* @method static User[]|Proxy[] findBy(array $attributes)
27-
* @method static User[]|Proxy[] randomRange(int $min, int $max, array $attributes = [])
28-
* @method static User[]|Proxy[] randomSet(int $number, array $attributes = [])
29-
* @method FactoryCollection<User|Proxy> many(int $min, int|null $max = null)
30-
* @method FactoryCollection<User|Proxy> sequence(iterable|callable $sequence)
31-
* @method static ProxyRepositoryDecorator<User, UserRepository> repository()
15+
* @method User|Proxy create(array|callable $attributes = [])
16+
* @method static User|Proxy createOne(array $attributes = [])
17+
* @method static User|Proxy find(object|array|mixed $criteria)
18+
* @method static User|Proxy findOrCreate(array $attributes)
19+
* @method static User|Proxy first(string $sortedField = 'id')
20+
* @method static User|Proxy last(string $sortedField = 'id')
21+
* @method static User|Proxy random(array $attributes = [])
22+
* @method static User|Proxy randomOrCreate(array $attributes = [])
23+
* @method static User[]|Proxy[] all()
24+
* @method static User[]|Proxy[] createMany(int $number, array|callable $attributes = [])
25+
* @method static User[]|Proxy[] createSequence((iterable|callable) $sequence)
26+
* @method static User[]|Proxy[] findBy(array $attributes)
27+
* @method static User[]|Proxy[] randomRange(int $min, int $max, array $attributes = [])
28+
* @method static User[]|Proxy[] randomSet(int $number, array $attributes = [])
29+
* @method FactoryCollection<User|Proxy> many(int $min, int|null $max = null)
30+
* @method FactoryCollection<User|Proxy> sequence(iterable|callable $sequence)
31+
* @method static ProxyRepositoryDecorator<User, UserRepository> repository()
3232
*
3333
* @phpstan-method User&Proxy<User> create(array|callable $attributes = [])
3434
* @phpstan-method static User&Proxy<User> createOne(array $attributes = [])

api/src/Validator/UniqueUserBookValidator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function validate($value, Constraint $constraint): void
5050
throw new ValidatorException(\sprintf('"%s" is not a valid entity.', $className));
5151
}
5252

53-
if ($manager->getRepository($className)->findOneBy(['user' => $user, 'book' => $book]) !== null) {
53+
if (null !== $manager->getRepository($className)->findOneBy(['user' => $user, 'book' => $book])) {
5454
$this->context->buildViolation($constraint->message)->addViolation();
5555
}
5656
}

0 commit comments

Comments
 (0)