Next major version 2 with PHP 8.1, Symfony 6, Tabler UI, 2FA ... (#2902)

This commit is contained in:
Kevin Papst
2022-12-31 21:19:55 +01:00
committed by GitHub
parent 95e06746bd
commit 90a0fd8a22
2164 changed files with 83700 additions and 86426 deletions

View File

@@ -25,7 +25,7 @@ use Faker\Factory;
*
* @codeCoverageIgnore
*/
class TeamFixtures extends Fixture
final class TeamFixtures extends Fixture
{
public const AMOUNT_TEAMS = 10;
public const MAX_USERS_PER_TEAM = 15;
@@ -69,10 +69,7 @@ class TeamFixtures extends Fixture
return $all;
}
/**
* {@inheritdoc}
*/
public function load(ObjectManager $manager)
public function load(ObjectManager $manager): void
{
$allUsers = $this->getAllUsers($manager);
$allProjects = $this->getAllProjects($manager);
@@ -91,10 +88,10 @@ class TeamFixtures extends Fixture
}
$projectCount = mt_rand(0, $maxProjects);
$team = new Team();
$team->setName($faker->company . ' ' . $i);
$team = new Team($faker->company() . ' ' . $i);
$team->addTeamlead($allUsers[array_rand($allUsers)]);
/* @phpstan-ignore-next-line */
if ($userCount > 0) {
$userKeys = array_rand($allUsers, $userCount);
if (!\is_array($userKeys)) {
@@ -119,6 +116,6 @@ class TeamFixtures extends Fixture
}
$manager->flush();
$manager->clear(Team::class);
$manager->clear();
}
}