apply more cs rules for php-cs

This commit is contained in:
2023-10-17 13:27:03 +02:00
parent 0b0cbed9db
commit bc2041cbdd
1485 changed files with 8169 additions and 9620 deletions

View File

@@ -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;