cs: Switch to a stricter way of coding - this might break in a lot of places.

This commit is contained in:
Pol Dellaiera
2021-11-30 13:33:18 +01:00
parent 28d2c42454
commit 47c5855a21
957 changed files with 9025 additions and 568 deletions

View File

@@ -7,6 +7,15 @@
* the LICENSE file that was distributed with this source code.
*/
declare(strict_types=1);
/**
* 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\PersonBundle\Tests\Controller;
use Chill\MainBundle\Entity\Center;
@@ -35,7 +44,7 @@ use function json_encode;
* @internal
* @coversNothing
*/
class AccompanyingCourseApiControllerTest extends WebTestCase
final class AccompanyingCourseApiControllerTest extends WebTestCase
{
protected static EntityManagerInterface $em;
@@ -50,7 +59,7 @@ class AccompanyingCourseApiControllerTest extends WebTestCase
*/
public static function setUpBeforeClass()
{
static::bootKernel();
self::bootKernel();
}
/**
@@ -58,7 +67,7 @@ class AccompanyingCourseApiControllerTest extends WebTestCase
*/
public function setUp()
{
$this->client = static::createClient([], [
$this->client = self::createClient([], [
'PHP_AUTH_USER' => 'center a_social',
'PHP_AUTH_PW' => 'password',
]);
@@ -112,8 +121,8 @@ class AccompanyingCourseApiControllerTest extends WebTestCase
$maxGenerated = 3;
$maxResults = $maxGenerated * 8;
static::bootKernel();
$em = static::$container->get(EntityManagerInterface::class);
self::bootKernel();
$em = self::$container->get(EntityManagerInterface::class);
$center = $em->getRepository(Center::class)
->findOneBy(['name' => 'Center A']);
@@ -176,8 +185,8 @@ class AccompanyingCourseApiControllerTest extends WebTestCase
$maxGenerated = 3;
$maxResults = $maxGenerated * 8;
static::bootKernel();
$em = static::$container->get(EntityManagerInterface::class);
self::bootKernel();
$em = self::$container->get(EntityManagerInterface::class);
$center = $em->getRepository(Center::class)
->findOneBy(['name' => 'Center A']);
$qb = $em->createQueryBuilder();
@@ -237,8 +246,8 @@ class AccompanyingCourseApiControllerTest extends WebTestCase
$dataLength = 2;
$maxResults = 100;
static::bootKernel();
$em = static::$container->get(EntityManagerInterface::class);
self::bootKernel();
$em = self::$container->get(EntityManagerInterface::class);
$center = $em->getRepository(Center::class)
->findOneBy(['name' => 'Center A']);
$qb = $em->createQueryBuilder();