mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-28 02:23:51 +00:00
apply more cs rules for php-cs
This commit is contained in:
@@ -15,14 +15,11 @@ use Chill\MainBundle\Entity\User;
|
||||
use Doctrine\Common\DataFixtures\AbstractFixture;
|
||||
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
|
||||
use Doctrine\Persistence\ObjectManager;
|
||||
use LogicException;
|
||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Symfony\Component\Security\Core\Encoder\EncoderFactory;
|
||||
use Symfony\Component\Security\Core\Encoder\MessageDigestPasswordEncoder;
|
||||
|
||||
use function str_replace;
|
||||
|
||||
/**
|
||||
* Load fixtures users into database.
|
||||
*
|
||||
@@ -81,13 +78,13 @@ class LoadUsers extends AbstractFixture implements ContainerAwareInterface, Orde
|
||||
->getEncoder($user)
|
||||
->encodePassword('password', $user->getSalt())
|
||||
)
|
||||
->setEmail(sprintf('%s@chill.social', str_replace(' ', '', (string) $username)));
|
||||
->setEmail(sprintf('%s@chill.social', \str_replace(' ', '', (string) $username)));
|
||||
|
||||
foreach ($params['groupCenterRefs'] as $groupCenterRef) {
|
||||
$user->addGroupCenter($this->getReference($groupCenterRef));
|
||||
}
|
||||
|
||||
echo 'Creating user ' . $username . "... \n";
|
||||
echo 'Creating user '.$username."... \n";
|
||||
$manager->persist($user);
|
||||
$this->addReference($username, $user);
|
||||
}
|
||||
@@ -95,10 +92,10 @@ class LoadUsers extends AbstractFixture implements ContainerAwareInterface, Orde
|
||||
$manager->flush();
|
||||
}
|
||||
|
||||
public function setContainer(?ContainerInterface $container = null)
|
||||
public function setContainer(ContainerInterface $container = null)
|
||||
{
|
||||
if (null === $container) {
|
||||
throw new LogicException('$container should not be null');
|
||||
throw new \LogicException('$container should not be null');
|
||||
}
|
||||
|
||||
$this->container = $container;
|
||||
|
Reference in New Issue
Block a user