cs: Enable more risky rules.

This commit is contained in:
Pol Dellaiera
2021-11-30 11:37:57 +01:00
parent c8195e6df5
commit a9188355c5
193 changed files with 306 additions and 63 deletions

View File

@@ -25,6 +25,7 @@ use Symfony\Component\HttpFoundation\Request;
use function array_map;
use function array_pop;
use function array_rand;
use function count;
use function json_decode;
use function json_encode;

View File

@@ -19,6 +19,7 @@ use Doctrine\ORM\EntityManagerInterface;
use Iterator;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
use function array_pop;
use function count;
use function preg_match;
/**

View File

@@ -15,6 +15,7 @@ use DateTime;
use Doctrine\Common\Collections\Criteria;
use LogicalException;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
use function array_key_exists;
/**
* Test the creation or deletion of accompanying periods.

View File

@@ -22,6 +22,7 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use function array_pop;
use function count;
use function json_decode;
use function json_encode;
use function random_int;

View File

@@ -14,6 +14,8 @@ use DateTime;
use Symfony\Bundle\FrameworkBundle\KernelBrowser;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
use Symfony\Component\DomCrawler\Form;
use function count;
use function in_array;
/**
* Test creation and deletion for persons.

View File

@@ -16,7 +16,7 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
* @internal
* @coversNothing
*/
class PersonControllerViewTestWithHiddenFields extends WebTestCase
class PersonControllerViewWithHiddenFieldsTest extends WebTestCase
{
/**
* @var \Doctrine\ORM\EntityManagerInterface The entity manager

View File

@@ -13,6 +13,7 @@ use Chill\MainBundle\Test\PrepareClientTrait;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
use Symfony\Component\HttpFoundation\Request;
use function array_pop;
use function count;
use function json_decode;
/**

View File

@@ -16,6 +16,7 @@ use Chill\PersonBundle\Entity\Person;
use Chill\ThirdPartyBundle\Entity\ThirdParty;
use DateTime;
use DateTimeInterface;
use function count;
/**
* @internal

View File

@@ -12,6 +12,7 @@ namespace Chill\PersonBundle\Tests\Form\Type;
use Chill\PersonBundle\Form\Type\PickPersonType;
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
use function count;
/**
* @internal

View File

@@ -16,6 +16,7 @@ use Chill\PersonBundle\Household\MembersEditorFactory;
use DateTimeImmutable;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Validator\Validator\ValidatorInterface;
use function count;
/**
* @internal
@@ -91,7 +92,7 @@ class MembersEditorTest extends TestCase
);
$persistables = $editor->getPersistable();
$this->assertEquals(\count($persistables), 1);
$this->assertEquals(count($persistables), 1);
$membership1 = $persistables[0];
$this->assertSame($household1, $membership1->getHousehold());