cs: Fix code style (safe rules only).

This commit is contained in:
Pol Dellaiera
2021-11-23 14:06:38 +01:00
parent 149d7ce991
commit 8f96a1121d
1223 changed files with 65199 additions and 64625 deletions

View File

@@ -1,48 +1,51 @@
<?php
/**
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\MainBundle\DataFixtures\ORM;
use Chill\MainBundle\Command\LoadCountriesCommand;
use Doctrine\Common\DataFixtures\AbstractFixture;
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
use Doctrine\Persistence\ObjectManager;
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Doctrine\Persistence\ObjectManager;
use Chill\MainBundle\Command\LoadCountriesCommand;
/**
* Load countries into database
*
* @author Julien Fastré <julien arobase fastre point info>
* Load countries into database.
*/
class LoadCountries extends AbstractFixture implements ContainerAwareInterface, OrderedFixtureInterface {
class LoadCountries extends AbstractFixture implements ContainerAwareInterface, OrderedFixtureInterface
{
/**
*
* @var ContainerInterface
*/
private $container;
public function setContainer(ContainerInterface $container = null)
public function getOrder()
{
return 20;
}
public function load(ObjectManager $manager)
{
echo "loading countries... \n";
$languages = $this->container->getParameter('chill_main.available_languages');
foreach (LoadCountriesCommand::prepareCountryList($languages) as $country) {
$manager->persist($country);
}
$manager->flush();
}
public function setContainer(?ContainerInterface $container = null)
{
$this->container = $container;
}
public function getOrder() {
return 20;
}
public function load(ObjectManager $manager) {
echo "loading countries... \n";
$languages = $this->container->getParameter('chill_main.available_languages');
foreach (LoadCountriesCommand::prepareCountryList($languages) as $country){
$manager->persist($country);
}
$manager->flush();
}
}