mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-31 20:13:49 +00:00
apply more cs rules for php-cs
This commit is contained in:
@@ -15,11 +15,10 @@ use Chill\MainBundle\Entity\Center;
|
||||
use Chill\MainBundle\Tests\TestHelper;
|
||||
use Faker;
|
||||
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
||||
use function array_filter;
|
||||
use function array_rand;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @coversNothing
|
||||
*/
|
||||
final class SingleTaskControllerTest extends WebTestCase
|
||||
@@ -58,7 +57,7 @@ final class SingleTaskControllerTest extends WebTestCase
|
||||
|
||||
$client->submit($form, [
|
||||
'title' => $title,
|
||||
'circle' => $circles[array_rand($circles)],
|
||||
'circle' => $circles[\array_rand($circles)],
|
||||
]);
|
||||
|
||||
$this->assertTrue($client->getResponse()->isRedirect(sprintf(
|
||||
@@ -88,7 +87,7 @@ final class SingleTaskControllerTest extends WebTestCase
|
||||
->getRepository(Center::class)
|
||||
->findAll();
|
||||
|
||||
$center = array_filter(
|
||||
$center = \array_filter(
|
||||
$centers,
|
||||
static fn (Center $c) => $c->getName() === $centerName
|
||||
)[0];
|
||||
@@ -96,12 +95,12 @@ final class SingleTaskControllerTest extends WebTestCase
|
||||
$ids = $em
|
||||
->createQuery(
|
||||
'SELECT p.id FROM ChillPersonBundle:Person p '
|
||||
. 'WHERE p.center = :center'
|
||||
.'WHERE p.center = :center'
|
||||
)
|
||||
->setParameter('center', $center)
|
||||
->getResult();
|
||||
|
||||
$id = $ids[array_rand($ids)];
|
||||
$id = $ids[\array_rand($ids)];
|
||||
|
||||
return self::$kernel
|
||||
->getContainer()
|
||||
|
@@ -15,6 +15,7 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @coversNothing
|
||||
*/
|
||||
final class TaskControllerTest extends WebTestCase {}
|
||||
|
@@ -28,10 +28,10 @@ use Prophecy\Argument;
|
||||
use Prophecy\PhpUnit\ProphecyTrait;
|
||||
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
|
||||
use Symfony\Component\Security\Core\Security;
|
||||
use function count;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @coversNothing
|
||||
*/
|
||||
final class SingleTaskACLAwareRepositoryTest extends KernelTestCase
|
||||
@@ -152,7 +152,7 @@ final class SingleTaskACLAwareRepositoryTest extends KernelTestCase
|
||||
|
||||
$tasks = $repository->findByAllViewable(null, []);
|
||||
|
||||
$this->assertGreaterThanOrEqual(0, count($tasks));
|
||||
$this->assertGreaterThanOrEqual(0, \count($tasks));
|
||||
}
|
||||
|
||||
public function testFindByCourse(): void
|
||||
@@ -162,7 +162,7 @@ final class SingleTaskACLAwareRepositoryTest extends KernelTestCase
|
||||
$scopes = $this->scopeRepository->findAll();
|
||||
/** @var Person $person */
|
||||
$person = $this->em->createQuery(
|
||||
'SELECT p FROM ' . Person::class . ' p JOIN p.centerCurrent cc
|
||||
'SELECT p FROM '.Person::class.' p JOIN p.centerCurrent cc
|
||||
WHERE SIZE(p.accompanyingPeriodParticipations) > 0
|
||||
AND cc.center = :center'
|
||||
)
|
||||
@@ -191,7 +191,7 @@ final class SingleTaskACLAwareRepositoryTest extends KernelTestCase
|
||||
|
||||
$tasks = $repository->findByCourse($period);
|
||||
|
||||
$this->assertGreaterThanOrEqual(0, count($tasks));
|
||||
$this->assertGreaterThanOrEqual(0, \count($tasks));
|
||||
}
|
||||
|
||||
public function testFindByPerson(): void
|
||||
@@ -221,6 +221,6 @@ final class SingleTaskACLAwareRepositoryTest extends KernelTestCase
|
||||
|
||||
$tasks = $repository->findByPerson($person, null, []);
|
||||
|
||||
$this->assertGreaterThanOrEqual(0, count($tasks));
|
||||
$this->assertGreaterThanOrEqual(0, \count($tasks));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user