apply more cs rules for php-cs

This commit is contained in:
2023-10-17 13:27:03 +02:00
parent 0b0cbed9db
commit bc2041cbdd
1485 changed files with 8169 additions and 9620 deletions

View File

@@ -33,6 +33,7 @@ use Symfony\Component\Security\Core\Security;
/**
* @internal
*
* @coversNothing
*/
class ActivityACLAwareRepositoryTest extends KernelTestCase
@@ -182,7 +183,7 @@ class ActivityACLAwareRepositoryTest extends KernelTestCase
if (null === $person = $this->entityManager->createQueryBuilder()
->select('p')->from(Person::class, 'p')->setMaxResults(1)
->getQuery()->getSingleResult()) {
throw new \RuntimeException("person not found");
throw new \RuntimeException('person not found');
}
/** @var AccompanyingPeriod $period1 */
@@ -193,7 +194,7 @@ class ActivityACLAwareRepositoryTest extends KernelTestCase
->setMaxResults(1)
->getQuery()
->getSingleResult()) {
throw new \RuntimeException("no period found");
throw new \RuntimeException('no period found');
}
/** @var AccompanyingPeriod $period2 */
@@ -206,7 +207,7 @@ class ActivityACLAwareRepositoryTest extends KernelTestCase
->setMaxResults(1)
->getQuery()
->getSingleResult()) {
throw new \RuntimeException("no second period found");
throw new \RuntimeException('no second period found');
}
// add a period
$period1->addPerson($person);
@@ -222,7 +223,7 @@ class ActivityACLAwareRepositoryTest extends KernelTestCase
->setMaxResults(2)
->getQuery()
->getResult()) {
throw new \RuntimeException("no types");
throw new \RuntimeException('no types');
}
if ([] === $jobs = $this->entityManager
@@ -233,7 +234,7 @@ class ActivityACLAwareRepositoryTest extends KernelTestCase
->getQuery()
->getResult()
) {
throw new \RuntimeException("no jobs found");
throw new \RuntimeException('no jobs found');
}
if (null === $user = $this->entityManager
@@ -244,19 +245,19 @@ class ActivityACLAwareRepositoryTest extends KernelTestCase
->getQuery()
->getSingleResult()
) {
throw new \RuntimeException("no user found");
throw new \RuntimeException('no user found');
}
if ([] === $centers = $this->entityManager->createQueryBuilder()
->select('c')->from(Center::class, 'c')->setMaxResults(2)->getQuery()
->getResult()) {
throw new \RuntimeException("no centers found");
throw new \RuntimeException('no centers found');
}
if ([] === $scopes = $this->entityManager->createQueryBuilder()
->select('s')->from(Scope::class, 's')->setMaxResults(2)->getQuery()
->getResult()) {
throw new \RuntimeException("no scopes found");
throw new \RuntimeException('no scopes found');
}
yield [$person, $user, $centers, $scopes, ActivityVoter::SEE, 0, 5, ['date' => 'DESC'], []];
@@ -279,7 +280,7 @@ class ActivityACLAwareRepositoryTest extends KernelTestCase
->setMaxResults(1)
->getQuery()
->getSingleResult()) {
throw new \RuntimeException("no period found");
throw new \RuntimeException('no period found');
}
if ([] === $types = $this->entityManager
@@ -289,7 +290,7 @@ class ActivityACLAwareRepositoryTest extends KernelTestCase
->setMaxResults(2)
->getQuery()
->getResult()) {
throw new \RuntimeException("no types");
throw new \RuntimeException('no types');
}
if ([] === $jobs = $this->entityManager
@@ -300,7 +301,7 @@ class ActivityACLAwareRepositoryTest extends KernelTestCase
->getQuery()
->getResult()
) {
throw new \RuntimeException("no jobs found");
throw new \RuntimeException('no jobs found');
}
if (null === $user = $this->entityManager
@@ -311,7 +312,7 @@ class ActivityACLAwareRepositoryTest extends KernelTestCase
->getQuery()
->getSingleResult()
) {
throw new \RuntimeException("no user found");
throw new \RuntimeException('no user found');
}
yield [$period, $user, ActivityVoter::SEE, 0, 10, ['date' => 'DESC'], []];