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\AccompanyingPeriod;
use Chill\MainBundle\Entity\Center;
@@ -20,14 +29,14 @@ use Symfony\Component\HttpFoundation\Request;
* @internal
* @coversNothing
*/
class AccompanyingPeriodConfidentialTest extends WebTestCase
final class AccompanyingPeriodConfidentialTest extends WebTestCase
{
/**
* Setup before the first test of this class (see phpunit doc).
*/
public static function setUpBeforeClass()
{
static::bootKernel();
self::bootKernel();
}
/**
@@ -35,7 +44,7 @@ class AccompanyingPeriodConfidentialTest extends WebTestCase
*/
public function setUp()
{
$this->client = static::createClient([], [
$this->client = self::createClient([], [
'PHP_AUTH_USER' => 'fred',
'PHP_AUTH_PW' => 'password',
]);
@@ -46,8 +55,8 @@ class AccompanyingPeriodConfidentialTest extends WebTestCase
$maxGenerated = 3;
$maxResults = $maxGenerated * 8;
static::bootKernel();
$em = static::$kernel->getContainer()->get('doctrine.orm.entity_manager');
self::bootKernel();
$em = self::$kernel->getContainer()->get('doctrine.orm.entity_manager');
$center = $em->getRepository(Center::class)
->findOneBy(['name' => 'Center A']);
@@ -95,7 +104,7 @@ class AccompanyingPeriodConfidentialTest extends WebTestCase
{
$period = self::$container->get(AccompanyingPeriodRepository::class)
->find($periodId);
$em = static::$kernel->getContainer()->get('doctrine.orm.entity_manager');
$em = self::$kernel->getContainer()->get('doctrine.orm.entity_manager');
$isConfidential = $period->isConfidential();
$step = $period->getStep();

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\AccompanyingPeriod\SocialIssueConsistency;
use Chill\PersonBundle\AccompanyingPeriod\SocialIssueConsistency\AccompanyingPeriodLinkedWithSocialIssuesEntityInterface;
@@ -22,7 +31,7 @@ use PHPUnit\Framework\TestCase;
* @internal
* @coversNothing
*/
class AccompanyingPeriodSocialIssueConsistencyEntityListenerTest extends TestCase
final class AccompanyingPeriodSocialIssueConsistencyEntityListenerTest extends TestCase
{
public function testPrePersist()
{