mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
DX: fix cs
This commit is contained in:
parent
542b6ccc83
commit
096e2f6e40
@ -234,7 +234,7 @@ final class ActivityControllerTest extends WebTestCase
|
|||||||
$user = new \Chill\MainBundle\Entity\User();
|
$user = new \Chill\MainBundle\Entity\User();
|
||||||
$user
|
$user
|
||||||
->setPassword($container->get('security.password_encoder')
|
->setPassword($container->get('security.password_encoder')
|
||||||
->encodePassword($user, 'password'))
|
->encodePassword($user, 'password'))
|
||||||
->setUsername($username)
|
->setUsername($username)
|
||||||
->addGroupCenter($groupCenter);
|
->addGroupCenter($groupCenter);
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ class LoadAsideActivity extends Fixture implements DependentFixtureInterface
|
|||||||
$this->getReference('aside_activity_category_0')
|
$this->getReference('aside_activity_category_0')
|
||||||
)
|
)
|
||||||
->setDate((new DateTimeImmutable('today'))
|
->setDate((new DateTimeImmutable('today'))
|
||||||
->sub(new DateInterval('P' . random_int(1, 100) . 'D')));
|
->sub(new DateInterval('P' . random_int(1, 100) . 'D')));
|
||||||
|
|
||||||
$manager->persist($activity);
|
$manager->persist($activity);
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,14 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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\AsideActivityBundle\Export\Export;
|
namespace Chill\AsideActivityBundle\Export\Export;
|
||||||
|
|
||||||
use Chill\AsideActivityBundle\Entity\AsideActivity;
|
use Chill\AsideActivityBundle\Entity\AsideActivity;
|
||||||
|
@ -2,6 +2,13 @@
|
|||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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\Migrations\Budget;
|
namespace Chill\Migrations\Budget;
|
||||||
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
@ -104,6 +104,7 @@ interface PaginatorInterface extends Countable
|
|||||||
/**
|
/**
|
||||||
* check if the page with the given number exists.
|
* check if the page with the given number exists.
|
||||||
*
|
*
|
||||||
|
* @param mixed $number
|
||||||
*/
|
*/
|
||||||
public function hasPage($number): bool;
|
public function hasPage($number): bool;
|
||||||
|
|
||||||
|
@ -70,10 +70,10 @@ class AccompanyingPeriodController extends AbstractController
|
|||||||
if ($person->isOpen() === false) {
|
if ($person->isOpen() === false) {
|
||||||
$this->get('session')->getFlashBag()
|
$this->get('session')->getFlashBag()
|
||||||
->add('error', $this->get('translator')
|
->add('error', $this->get('translator')
|
||||||
->trans(
|
->trans(
|
||||||
'Beware period is closed',
|
'Beware period is closed',
|
||||||
['%name%' => $person->__toString()]
|
['%name%' => $person->__toString()]
|
||||||
));
|
));
|
||||||
|
|
||||||
return $this->redirect(
|
return $this->redirect(
|
||||||
$this->generateUrl('chill_person_accompanying_period_list', [
|
$this->generateUrl('chill_person_accompanying_period_list', [
|
||||||
@ -99,9 +99,9 @@ class AccompanyingPeriodController extends AbstractController
|
|||||||
if (count($errors) === 0) {
|
if (count($errors) === 0) {
|
||||||
$this->get('session')->getFlashBag()
|
$this->get('session')->getFlashBag()
|
||||||
->add('success', $this->get('translator')
|
->add('success', $this->get('translator')
|
||||||
->trans('An accompanying period has been closed.', [
|
->trans('An accompanying period has been closed.', [
|
||||||
'%name%' => $person->__toString(),
|
'%name%' => $person->__toString(),
|
||||||
]));
|
]));
|
||||||
|
|
||||||
$this->getDoctrine()->getManager()->flush();
|
$this->getDoctrine()->getManager()->flush();
|
||||||
|
|
||||||
@ -113,7 +113,7 @@ class AccompanyingPeriodController extends AbstractController
|
|||||||
}
|
}
|
||||||
$this->get('session')->getFlashBag()
|
$this->get('session')->getFlashBag()
|
||||||
->add('error', $this->get('translator')
|
->add('error', $this->get('translator')
|
||||||
->trans('Error! Period not closed!'));
|
->trans('Error! Period not closed!'));
|
||||||
|
|
||||||
foreach ($errors as $error) {
|
foreach ($errors as $error) {
|
||||||
$this->get('session')->getFlashBag()
|
$this->get('session')->getFlashBag()
|
||||||
@ -251,10 +251,10 @@ class AccompanyingPeriodController extends AbstractController
|
|||||||
if ($person->isOpen()) {
|
if ($person->isOpen()) {
|
||||||
$this->get('session')->getFlashBag()
|
$this->get('session')->getFlashBag()
|
||||||
->add('error', $this->get('translator')
|
->add('error', $this->get('translator')
|
||||||
->trans(
|
->trans(
|
||||||
'Error! Period %name% is not closed ; it can be open',
|
'Error! Period %name% is not closed ; it can be open',
|
||||||
['%name%' => $person->__toString()]
|
['%name%' => $person->__toString()]
|
||||||
));
|
));
|
||||||
|
|
||||||
return $this->redirect(
|
return $this->redirect(
|
||||||
$this->generateUrl('chill_person_accompanying_period_list', [
|
$this->generateUrl('chill_person_accompanying_period_list', [
|
||||||
@ -285,10 +285,10 @@ class AccompanyingPeriodController extends AbstractController
|
|||||||
if (count($errors) <= 0) {
|
if (count($errors) <= 0) {
|
||||||
$this->get('session')->getFlashBag()
|
$this->get('session')->getFlashBag()
|
||||||
->add('success', $this->get('translator')
|
->add('success', $this->get('translator')
|
||||||
->trans(
|
->trans(
|
||||||
'An accompanying period has been opened.',
|
'An accompanying period has been opened.',
|
||||||
['%name%' => $person->__toString()]
|
['%name%' => $person->__toString()]
|
||||||
));
|
));
|
||||||
|
|
||||||
$this->getDoctrine()->getManager()->flush();
|
$this->getDoctrine()->getManager()->flush();
|
||||||
|
|
||||||
@ -300,7 +300,7 @@ class AccompanyingPeriodController extends AbstractController
|
|||||||
}
|
}
|
||||||
$this->get('session')->getFlashBag()
|
$this->get('session')->getFlashBag()
|
||||||
->add('error', $this->get('translator')
|
->add('error', $this->get('translator')
|
||||||
->trans('Period not opened'));
|
->trans('Period not opened'));
|
||||||
|
|
||||||
foreach ($errors as $error) {
|
foreach ($errors as $error) {
|
||||||
$this->get('session')->getFlashBag()
|
$this->get('session')->getFlashBag()
|
||||||
|
@ -159,7 +159,7 @@ final class PersonDocGenNormalizerTest extends KernelTestCase
|
|||||||
$householdMember = new HouseholdMember();
|
$householdMember = new HouseholdMember();
|
||||||
$householdMember
|
$householdMember
|
||||||
->setPosition((new Position())->setAllowHolder(true)->setLabel(['fr' => 'position'])
|
->setPosition((new Position())->setAllowHolder(true)->setLabel(['fr' => 'position'])
|
||||||
->setShareHousehold(true))
|
->setShareHousehold(true))
|
||||||
->setHolder(true);
|
->setHolder(true);
|
||||||
$person->addHouseholdParticipation($householdMember);
|
$person->addHouseholdParticipation($householdMember);
|
||||||
$household->addMember($householdMember);
|
$household->addMember($householdMember);
|
||||||
@ -171,7 +171,7 @@ final class PersonDocGenNormalizerTest extends KernelTestCase
|
|||||||
$householdMember = new HouseholdMember();
|
$householdMember = new HouseholdMember();
|
||||||
$householdMember
|
$householdMember
|
||||||
->setPosition((new Position())->setAllowHolder(true)->setLabel(['fr' => 'position2'])
|
->setPosition((new Position())->setAllowHolder(true)->setLabel(['fr' => 'position2'])
|
||||||
->setShareHousehold(true))
|
->setShareHousehold(true))
|
||||||
->setHolder(false);
|
->setHolder(false);
|
||||||
$person->addHouseholdParticipation($householdMember);
|
$person->addHouseholdParticipation($householdMember);
|
||||||
$household->addMember($householdMember);
|
$household->addMember($householdMember);
|
||||||
|
@ -1,5 +1,14 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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 Validator\AccompanyingPeriod;
|
namespace Validator\AccompanyingPeriod;
|
||||||
|
|
||||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||||
@ -13,6 +22,10 @@ use Prophecy\Argument;
|
|||||||
use Prophecy\PhpUnit\ProphecyTrait;
|
use Prophecy\PhpUnit\ProphecyTrait;
|
||||||
use Symfony\Component\Validator\Test\ConstraintValidatorTestCase;
|
use Symfony\Component\Validator\Test\ConstraintValidatorTestCase;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @internal
|
||||||
|
* @coversNothing
|
||||||
|
*/
|
||||||
class ParticipationOverlapValidatorTest extends ConstraintValidatorTestCase
|
class ParticipationOverlapValidatorTest extends ConstraintValidatorTestCase
|
||||||
{
|
{
|
||||||
use ProphecyTrait;
|
use ProphecyTrait;
|
||||||
@ -101,8 +114,4 @@ class ParticipationOverlapValidatorTest extends ConstraintValidatorTestCase
|
|||||||
{
|
{
|
||||||
return new ParticipationOverlap(['message' => 'participation-overlaps']);
|
return new ParticipationOverlap(['message' => 'participation-overlaps']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -74,7 +74,7 @@ final class TimelineProviderTest extends WebTestCase
|
|||||||
|
|
||||||
$report = (new Report())
|
$report = (new Report())
|
||||||
->setUser(self::$em->getRepository(\Chill\MainBundle\Entity\User::class)
|
->setUser(self::$em->getRepository(\Chill\MainBundle\Entity\User::class)
|
||||||
->findOneByUsername('center a_social'))
|
->findOneByUsername('center a_social'))
|
||||||
->setDate(new DateTime('2015-05-02'))
|
->setDate(new DateTime('2015-05-02'))
|
||||||
->setPerson($this->person)
|
->setPerson($this->person)
|
||||||
->setCFGroup($this->getHousingCustomFieldsGroup())
|
->setCFGroup($this->getHousingCustomFieldsGroup())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user