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

@@ -22,6 +22,7 @@ use Iterator;
use Nelmio\Alice\Loader\NativeLoader;
use Nelmio\Alice\ObjectSet;
use function array_map;
use function count;
class LoadThirdParty extends Fixture implements DependentFixtureInterface
{
@@ -79,7 +80,7 @@ class LoadThirdParty extends Fixture implements DependentFixtureInterface
$number = random_int(1, count($references));
if (1 === $number) {
yield $this->getReference($references[\array_rand($references)]);
yield $this->getReference($references[array_rand($references)]);
} else {
foreach (array_rand($references, $number) as $index) {
yield $this->getReference($references[$index]);
@@ -89,7 +90,7 @@ class LoadThirdParty extends Fixture implements DependentFixtureInterface
private function getPostalCode(): PostalCode
{
$ref = LoadPostalCodes::$refs[\array_rand(LoadPostalCodes::$refs)];
$ref = LoadPostalCodes::$refs[array_rand(LoadPostalCodes::$refs)];
return $this->getReference($ref);
}

View File

@@ -31,6 +31,7 @@ use function array_map;
use function array_merge;
use function array_values;
use function in_array;
use function is_string;
use function spl_object_hash;
/**

View File

@@ -23,6 +23,7 @@ use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
use Symfony\Component\Translation\TranslatorInterface;
use function array_diff;
use function array_merge;
use function count;
use function is_array;
class PickThirdPartyType extends AbstractType

View File

@@ -19,6 +19,8 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Contracts\Translation\TranslatorInterface;
use function array_merge;
use function implode;
use function is_array;
use function is_string;
use function uasort;
class PickThirdPartyTypeCategoryType extends \Symfony\Component\Form\AbstractType

View File

@@ -17,6 +17,7 @@ use Chill\ThirdPartyBundle\Entity\ThirdParty;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
use Symfony\Component\Security\Core\Role\Role;
use function array_intersect;
use function count;
use function in_array;
/**