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