mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
php cs fixer and phpstan
This commit is contained in:
parent
b38f5800d9
commit
0c5b35926b
@ -36,8 +36,7 @@ class CountActivity implements ExportInterface, GroupedExportInterface
|
|||||||
public function __construct(
|
public function __construct(
|
||||||
EntityManagerInterface $em,
|
EntityManagerInterface $em,
|
||||||
AccompanyingCourseExportHelper $accompanyingCourseExportHelper
|
AccompanyingCourseExportHelper $accompanyingCourseExportHelper
|
||||||
|
) {
|
||||||
) {
|
|
||||||
$this->repository = $em->getRepository(Activity::class);
|
$this->repository = $em->getRepository(Activity::class);
|
||||||
$this->accompanyingCourseExportHelper = $accompanyingCourseExportHelper;
|
$this->accompanyingCourseExportHelper = $accompanyingCourseExportHelper;
|
||||||
}
|
}
|
||||||
|
@ -33,8 +33,7 @@ class CountCalendars implements ExportInterface, GroupedExportInterface
|
|||||||
public function __construct(
|
public function __construct(
|
||||||
CalendarRepository $calendarRepository,
|
CalendarRepository $calendarRepository,
|
||||||
AccompanyingCourseExportHelper $accompanyingCourseExportHelper
|
AccompanyingCourseExportHelper $accompanyingCourseExportHelper
|
||||||
)
|
) {
|
||||||
{
|
|
||||||
$this->calendarRepository = $calendarRepository;
|
$this->calendarRepository = $calendarRepository;
|
||||||
$this->accompanyingCourseExportHelper = $accompanyingCourseExportHelper;
|
$this->accompanyingCourseExportHelper = $accompanyingCourseExportHelper;
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,6 @@ class StatCalendarAvgDuration implements ExportInterface, GroupedExportInterface
|
|||||||
public function __construct(
|
public function __construct(
|
||||||
CalendarRepository $calendarRepository,
|
CalendarRepository $calendarRepository,
|
||||||
AccompanyingCourseExportHelper $accompanyingCourseExportHelper
|
AccompanyingCourseExportHelper $accompanyingCourseExportHelper
|
||||||
|
|
||||||
) {
|
) {
|
||||||
$this->calendarRepository = $calendarRepository;
|
$this->calendarRepository = $calendarRepository;
|
||||||
$this->accompanyingCourseExportHelper = $accompanyingCourseExportHelper;
|
$this->accompanyingCourseExportHelper = $accompanyingCourseExportHelper;
|
||||||
|
@ -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\MainBundle\Export;
|
namespace Chill\MainBundle\Export;
|
||||||
|
|
||||||
use Doctrine\ORM\QueryBuilder;
|
use Doctrine\ORM\QueryBuilder;
|
||||||
@ -10,11 +19,11 @@ final readonly class AccompanyingCourseExportHelper
|
|||||||
{
|
{
|
||||||
$qb->leftJoin('acp.closingMotive', 'cm')
|
$qb->leftJoin('acp.closingMotive', 'cm')
|
||||||
->andWhere(
|
->andWhere(
|
||||||
$qb->expr()->orX(
|
$qb->expr()->orX(
|
||||||
$qb->expr()->eq('cm.isCanceledAccompanyingPeriod', 'false'),
|
$qb->expr()->eq('cm.isCanceledAccompanyingPeriod', 'false'),
|
||||||
$qb->expr()->isNull('acp.closingMotive')
|
$qb->expr()->isNull('acp.closingMotive')
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
return $qb;
|
return $qb;
|
||||||
}
|
}
|
||||||
|
@ -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 Export;
|
namespace Export;
|
||||||
|
|
||||||
use Chill\MainBundle\Export\AccompanyingCourseExportHelper;
|
use Chill\MainBundle\Export\AccompanyingCourseExportHelper;
|
||||||
@ -11,6 +20,10 @@ use Doctrine\ORM\EntityRepository;
|
|||||||
use Doctrine\ORM\QueryBuilder;
|
use Doctrine\ORM\QueryBuilder;
|
||||||
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
|
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @internal
|
||||||
|
* @coversNothing
|
||||||
|
*/
|
||||||
class AccompanyingCourseExportHelperTest extends KernelTestCase
|
class AccompanyingCourseExportHelperTest extends KernelTestCase
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
@ -52,8 +65,7 @@ class AccompanyingCourseExportHelperTest extends KernelTestCase
|
|||||||
AccompanyingPeriod $periodA, //canceled
|
AccompanyingPeriod $periodA, //canceled
|
||||||
AccompanyingPeriod $periodB, // not canceled
|
AccompanyingPeriod $periodB, // not canceled
|
||||||
AccompanyingPeriod $periodC // canceled (child cm of canceled cm)
|
AccompanyingPeriod $periodC // canceled (child cm of canceled cm)
|
||||||
): void
|
): void {
|
||||||
{
|
|
||||||
$qb = $this->em->getRepository(AccompanyingPeriod::class)->createQueryBuilder('acp');
|
$qb = $this->em->getRepository(AccompanyingPeriod::class)->createQueryBuilder('acp');
|
||||||
$this->accompanyingCourseExportHelper::addClosingMotiveExclusionClause($qb);
|
$this->accompanyingCourseExportHelper::addClosingMotiveExclusionClause($qb);
|
||||||
|
|
||||||
|
@ -163,9 +163,9 @@ class ClosingMotive
|
|||||||
return $this->children->count() > 0;
|
return $this->children->count() > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function isFalseAccompanyingPeriod(): bool
|
public function isCanceledAccompanyingPeriod(): bool
|
||||||
{
|
{
|
||||||
return $this->isFalseAccompanyingPeriod;
|
return $this->isCanceledAccompanyingPeriod;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function removeChildren(ClosingMotive $child): ClosingMotive
|
public function removeChildren(ClosingMotive $child): ClosingMotive
|
||||||
|
@ -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\Person;
|
namespace Chill\Migrations\Person;
|
||||||
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user