mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-29 19:13:49 +00:00
apply more cs rules for php-cs
This commit is contained in:
@@ -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'], []];
|
||||
|
Reference in New Issue
Block a user