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);
}