cs: Fix code style (safe rules only).

This commit is contained in:
Pol Dellaiera
2021-11-23 14:06:38 +01:00
parent 149d7ce991
commit 8f96a1121d
1223 changed files with 65199 additions and 64625 deletions

View File

@@ -1,47 +1,56 @@
<?php
/**
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\CalendarBundle\Tests\Controller;
use Chill\PersonBundle\Repository\AccompanyingPeriodRepository;
use Chill\PersonBundle\Entity\AccompanyingPeriod;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
use Symfony\Component\HttpFoundation\Request;
use Chill\PersonBundle\Entity\AccompanyingPeriod;
use function random_int;
/**
* @internal
* @coversNothing
*/
class CalendarControllerTest extends WebTestCase
{
/**
* Setup before each test method (see phpunit doc)
* Setup before each test method (see phpunit doc).
*/
public function setUp()
{
static::bootKernel();
$this->client = static::createClient(array(), array(
'PHP_AUTH_USER' => 'center a_social',
'PHP_AUTH_PW' => 'password',
));
$this->client = static::createClient([], [
'PHP_AUTH_USER' => 'center a_social',
'PHP_AUTH_PW' => 'password',
]);
}
public function provideAccompanyingPeriod(): iterable
{
static::bootKernel();
$em= static::$container->get(EntityManagerInterface::class);
$em = static::$container->get(EntityManagerInterface::class);
$nb = $em->createQueryBuilder()
->from(AccompanyingPeriod::class, 'ac')
->select('COUNT(ac) AS nb')
->getQuery()
->getSingleScalarResult()
;
->getSingleScalarResult();
yield [ $em->createQueryBuilder()
yield [$em->createQueryBuilder()
->from(AccompanyingPeriod::class, 'ac')
->select('ac.id')
->setFirstResult(\random_int(0, $nb))
->setFirstResult(random_int(0, $nb))
->setMaxResults(1)
->getQuery()
->getSingleScalarResult()
->getSingleScalarResult(),
];
}