mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-01-09 14:07:25 +01:00
Formated code
This commit is contained in:
parent
32e2abff54
commit
0ca2838ae2
@ -5,7 +5,6 @@ namespace App\DataFixtures;
|
|||||||
use Doctrine\Bundle\FixturesBundle\Fixture;
|
use Doctrine\Bundle\FixturesBundle\Fixture;
|
||||||
use Doctrine\Common\Persistence\ObjectManager;
|
use Doctrine\Common\Persistence\ObjectManager;
|
||||||
use App\Entity\User;
|
use App\Entity\User;
|
||||||
use FOS\UserBundle\Util\PasswordUpdater;
|
|
||||||
use FOS\UserBundle\Doctrine\UserManager;
|
use FOS\UserBundle\Doctrine\UserManager;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -20,18 +19,19 @@ class DummyFixtures extends Fixture
|
|||||||
$this->addTestUser();
|
$this->addTestUser();
|
||||||
$manager->flush();
|
$manager->flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function addTestUser():void{
|
protected function addTestUser(): void
|
||||||
|
{
|
||||||
/**
|
/**
|
||||||
* @var UserManager $userManager
|
* @var UserManager
|
||||||
*/
|
*/
|
||||||
$userManager = $this->container->get('fos_user.user_manager');
|
$userManager = $this->container->get('fos_user.user_manager');
|
||||||
/**
|
/**
|
||||||
* @var User $testUser
|
* @var User
|
||||||
*/
|
*/
|
||||||
$testUser = $userManager->createUser();
|
$testUser = $userManager->createUser();
|
||||||
$testUser->setEmail("test@test.de");
|
$testUser->setEmail('test@test.de');
|
||||||
$testUser->setUsername("test");
|
$testUser->setUsername('test');
|
||||||
$testUser->setPlainPassword('test');
|
$testUser->setPlainPassword('test');
|
||||||
$testUser->setEnabled(true);
|
$testUser->setEnabled(true);
|
||||||
$userManager->updateUser($testUser);
|
$userManager->updateUser($testUser);
|
||||||
|
Loading…
Reference in New Issue
Block a user