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\EventBundle\Tests\Controller;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
@@ -15,7 +24,7 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
* @internal
* @coversNothing
*/
class EventControllerTest extends WebTestCase
final class EventControllerTest extends WebTestCase
{
public function testSkipped()
{

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\EventBundle\Tests\Controller;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
@@ -15,7 +24,7 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
* @internal
* @coversNothing
*/
class EventTypeControllerTest extends WebTestCase
final class EventTypeControllerTest extends WebTestCase
{
public function testSkipped()
{

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\EventBundle\Tests\Controller;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
@@ -19,7 +28,7 @@ use function in_array;
* @internal
* @coversNothing
*/
class ParticipationControllerTest extends WebTestCase
final class ParticipationControllerTest extends WebTestCase
{
/**
* @var \Symfony\Component\BrowserKit\Client
@@ -46,7 +55,7 @@ class ParticipationControllerTest extends WebTestCase
{
self::bootKernel();
$this->client = static::createClient([], [
$this->client = self::createClient([], [
'PHP_AUTH_USER' => 'center a_social',
'PHP_AUTH_PW' => 'password',
'HTTP_ACCEPT_LANGUAGE' => 'fr_FR',
@@ -457,7 +466,7 @@ class ParticipationControllerTest extends WebTestCase
$circles = $this->em->getRepository('ChillMainBundle:Scope')
->findAll();
array_filter($circles, static function ($circle) use ($circleName) {
return in_array($circleName, $circle->getName());
return in_array($circleName, $circle->getName(), true);
});
$circle = $circles[0];
@@ -509,7 +518,7 @@ class ParticipationControllerTest extends WebTestCase
$person = $persons[array_rand($persons)];
if (in_array($person->getId(), $this->personsIdsCache)) {
if (in_array($person->getId(), $this->personsIdsCache, true)) {
return $this->getRandomPerson($centerName); // we try another time
}
$this->personsIdsCache[] = $person->getId();

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\EventBundle\Tests\Controller;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
@@ -15,7 +24,7 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
* @internal
* @coversNothing
*/
class RoleControllerTest extends WebTestCase
final class RoleControllerTest extends WebTestCase
{
public function testSkipped()
{

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\EventBundle\Tests\Controller;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
@@ -15,7 +24,7 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
* @internal
* @coversNothing
*/
class StatusControllerTest extends WebTestCase
final class StatusControllerTest extends WebTestCase
{
public function testSkipped()
{