cs-fixer, phpstan et rector

This commit is contained in:
Mathieu Jaumotte 2023-10-04 09:45:15 +02:00
parent d6a1044585
commit 15e23087ed
16 changed files with 36 additions and 60 deletions

View File

@ -65,9 +65,7 @@ class ActivityUsersJobAggregator implements AggregatorInterface
return Declarations::ACTIVITY;
}
public function buildForm(FormBuilderInterface $builder)
{
}
public function buildForm(FormBuilderInterface $builder) {}
public function getFormDefaultData(): array
{

View File

@ -65,9 +65,7 @@ class ActivityUsersScopeAggregator implements AggregatorInterface
return Declarations::ACTIVITY;
}
public function buildForm(FormBuilderInterface $builder)
{
}
public function buildForm(FormBuilderInterface $builder) {}
public function getFormDefaultData(): array
{

View File

@ -65,9 +65,7 @@ class CreatorScopeAggregator implements AggregatorInterface
return Declarations::ACTIVITY;
}
public function buildForm(FormBuilderInterface $builder)
{
}
public function buildForm(FormBuilderInterface $builder) {}
public function getFormDefaultData(): array
{

View File

@ -15,9 +15,6 @@ use Chill\ActivityBundle\Export\Declarations;
use Chill\MainBundle\Entity\Scope;
use Chill\MainBundle\Entity\User\UserScopeHistory;
use Chill\MainBundle\Export\FilterInterface;
use Chill\MainBundle\Form\Type\PickRollingDateType;
use Chill\MainBundle\Service\RollingDate\RollingDate;
use Chill\MainBundle\Service\RollingDate\RollingDateConverter;
use Chill\MainBundle\Templating\TranslatableStringHelper;
use Doctrine\ORM\Query\Expr\Join;
use Doctrine\ORM\QueryBuilder;
@ -29,7 +26,6 @@ class UserScopeFilter implements FilterInterface
private const PREFIX = 'acp_act_filter_user_scope'; // creator ? cfr translation
public function __construct(
private readonly RollingDateConverter $rollingDateConverter,
private readonly TranslatableStringHelper $translatableStringHelper
) {}

View File

@ -65,9 +65,7 @@ class ByUserJobAggregator implements AggregatorInterface
return Declarations::ASIDE_ACTIVITY_TYPE;
}
public function buildForm(FormBuilderInterface $builder)
{
}
public function buildForm(FormBuilderInterface $builder) {}
public function getFormDefaultData(): array
{

View File

@ -64,9 +64,7 @@ class ByUserScopeAggregator implements AggregatorInterface
return Declarations::ASIDE_ACTIVITY_TYPE;
}
public function buildForm(FormBuilderInterface $builder)
{
}
public function buildForm(FormBuilderInterface $builder) {}
public function getFormDefaultData(): array
{

View File

@ -66,9 +66,7 @@ final readonly class JobAggregator implements AggregatorInterface
return Declarations::CALENDAR_TYPE;
}
public function buildForm(FormBuilderInterface $builder)
{
}
public function buildForm(FormBuilderInterface $builder) {}
public function getFormDefaultData(): array
{

View File

@ -66,9 +66,7 @@ final readonly class ScopeAggregator implements AggregatorInterface
return Declarations::CALENDAR_TYPE;
}
public function buildForm(FormBuilderInterface $builder)
{
}
public function buildForm(FormBuilderInterface $builder) {}
public function getFormDefaultData(): array
{

View File

@ -41,7 +41,8 @@ class CreatorJobAggregator implements AggregatorInterface
$qb
->leftJoin(
"acp.userHistories", "{$p}_userHistory",
"acp.userHistories",
"{$p}_userHistory",
Join::WITH,
$qb->expr()->andX(
$qb->expr()->eq("{$p}_userHistory.accompanyingPeriod", "acp.id"),
@ -55,7 +56,8 @@ class CreatorJobAggregator implements AggregatorInterface
)
)
->leftJoin(
UserJobHistory::class,"{$p}_jobHistory",
UserJobHistory::class,
"{$p}_jobHistory",
Expr\Join::WITH,
$qb->expr()->andX(
$qb->expr()->eq("{$p}_jobHistory.user", "{$p}_userHistory.createdBy"), // et si il est null ?
@ -77,9 +79,7 @@ class CreatorJobAggregator implements AggregatorInterface
return Declarations::ACP_TYPE;
}
public function buildForm(FormBuilderInterface $builder)
{
}
public function buildForm(FormBuilderInterface $builder) {}
public function getFormDefaultData(): array
{

View File

@ -13,10 +13,7 @@ namespace Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators;
use Chill\MainBundle\Entity\User\UserJobHistory;
use Chill\MainBundle\Export\AggregatorInterface;
use Chill\MainBundle\Form\Type\PickRollingDateType;
use Chill\MainBundle\Repository\UserJobRepositoryInterface;
use Chill\MainBundle\Service\RollingDate\RollingDate;
use Chill\MainBundle\Service\RollingDate\RollingDateConverter;
use Chill\MainBundle\Templating\TranslatableStringHelperInterface;
use Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodInfo;
use Chill\PersonBundle\Export\Declarations;
@ -29,7 +26,6 @@ final readonly class JobWorkingOnCourseAggregator implements AggregatorInterface
private const PREFIX = 'acp_agg_user_job_working_on_course';
public function __construct(
private RollingDateConverter $rollingDateConverter,
private UserJobRepositoryInterface $userJobRepository,
private TranslatableStringHelperInterface $translatableStringHelper,
) {}
@ -76,9 +72,7 @@ final readonly class JobWorkingOnCourseAggregator implements AggregatorInterface
return Declarations::ACP_TYPE;
}
public function buildForm(FormBuilderInterface $builder)
{
}
public function buildForm(FormBuilderInterface $builder) {}
public function getFormDefaultData(): array
{

View File

@ -41,7 +41,8 @@ readonly class ReferrerScopeAggregator implements AggregatorInterface
$qb
->leftJoin(
"acp.userHistories", "{$p}_userHistory",
"acp.userHistories",
"{$p}_userHistory",
Join::WITH,
$qb->expr()->andX(
$qb->expr()->eq("{$p}_userHistory.accompanyingPeriod", "acp.id"),
@ -55,7 +56,8 @@ readonly class ReferrerScopeAggregator implements AggregatorInterface
)
)
->leftJoin(
UserScopeHistory::class,"{$p}_scopeHistory",
UserScopeHistory::class,
"{$p}_scopeHistory",
Join::WITH,
$qb->expr()->andX(
$qb->expr()->eq("{$p}_scopeHistory.user", "{$p}_userHistory.user"),
@ -77,9 +79,7 @@ readonly class ReferrerScopeAggregator implements AggregatorInterface
return Declarations::ACP_TYPE;
}
public function buildForm(FormBuilderInterface $builder)
{
}
public function buildForm(FormBuilderInterface $builder) {}
public function getFormDefaultData(): array
{

View File

@ -13,10 +13,7 @@ namespace Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators;
use Chill\MainBundle\Entity\User\UserScopeHistory;
use Chill\MainBundle\Export\AggregatorInterface;
use Chill\MainBundle\Form\Type\PickRollingDateType;
use Chill\MainBundle\Repository\ScopeRepositoryInterface;
use Chill\MainBundle\Service\RollingDate\RollingDate;
use Chill\MainBundle\Service\RollingDate\RollingDateConverter;
use Chill\MainBundle\Templating\TranslatableStringHelperInterface;
use Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodInfo;
use Chill\PersonBundle\Export\Declarations;
@ -29,7 +26,6 @@ final readonly class ScopeWorkingOnCourseAggregator implements AggregatorInterfa
private const PREFIX = 'acp_agg_user_scope_working_on_course';
public function __construct(
private RollingDateConverter $rollingDateConverter,
private ScopeRepositoryInterface $scopeRepository,
private TranslatableStringHelperInterface $translatableStringHelper,
) {}
@ -76,9 +72,7 @@ final readonly class ScopeWorkingOnCourseAggregator implements AggregatorInterfa
return Declarations::ACP_TYPE;
}
public function buildForm(FormBuilderInterface $builder)
{
}
public function buildForm(FormBuilderInterface $builder) {}
public function getFormDefaultData(): array
{

View File

@ -40,7 +40,8 @@ final readonly class UserJobAggregator implements AggregatorInterface
$qb
->leftJoin(
"acp.userHistories", "{$p}_userHistory",
"acp.userHistories",
"{$p}_userHistory",
Join::WITH,
$qb->expr()->andX(
$qb->expr()->eq("{$p}_userHistory.accompanyingPeriod", "acp.id"),
@ -54,7 +55,8 @@ final readonly class UserJobAggregator implements AggregatorInterface
)
)
->leftJoin(
UserJobHistory::class, "{$p}_jobHistory",
UserJobHistory::class,
"{$p}_jobHistory",
Join::WITH,
$qb->expr()->andX(
$qb->expr()->eq("{$p}_jobHistory.user", "{$p}_userHistory.user"),
@ -76,9 +78,7 @@ final readonly class UserJobAggregator implements AggregatorInterface
return Declarations::ACP_TYPE;
}
public function buildForm(FormBuilderInterface $builder)
{
}
public function buildForm(FormBuilderInterface $builder) {}
public function getFormDefaultData(): array
{

View File

@ -42,7 +42,8 @@ class CreatorJobFilter implements FilterInterface
$qb
->join(
"acp.userHistories", "{$p}_userHistory",
"acp.userHistories",
"{$p}_userHistory",
Join::WITH,
$qb->expr()->andX(
$qb->expr()->eq("{$p}_userHistory.accompanyingPeriod", "acp.id"),
@ -56,7 +57,8 @@ class CreatorJobFilter implements FilterInterface
)
)
->leftJoin(
UserJobHistory::class,"{$p}_history",
UserJobHistory::class,
"{$p}_history",
Join::WITH,
$qb->expr()->andX(
$qb->expr()->eq("{$p}_history.user", "{$p}_userHistory.createdBy"),

View File

@ -42,7 +42,8 @@ class UserJobFilter implements FilterInterface
$qb
->leftJoin(
"acp.userHistories", "{$p}_userHistory",
"acp.userHistories",
"{$p}_userHistory",
Join::WITH,
$qb->expr()->andX(
$qb->expr()->eq("{$p}_userHistory.accompanyingPeriod", "acp.id"),
@ -56,7 +57,8 @@ class UserJobFilter implements FilterInterface
)
)
->leftJoin(
UserJobHistory::class, "{$p}_jobHistory",
UserJobHistory::class,
"{$p}_jobHistory",
Join::WITH,
$qb->expr()->andX(
$qb->expr()->eq("{$p}_jobHistory.user", "{$p}_userHistory.user"),

View File

@ -42,7 +42,8 @@ class UserScopeFilter implements FilterInterface
$qb
->join(
"acp.userHistories", "{$p}_userHistory",
"acp.userHistories",
"{$p}_userHistory",
Join::WITH,
$qb->expr()->andX(
$qb->expr()->eq("{$p}_userHistory.accompanyingPeriod", "acp.id"),
@ -56,7 +57,8 @@ class UserScopeFilter implements FilterInterface
)
)
->join(
UserScopeHistory::class, "{$p}_scopeHistory",
UserScopeHistory::class,
"{$p}_scopeHistory",
Join::WITH,
$qb->expr()->andX(
$qb->expr()->eq("{$p}_scopeHistory.user", "{$p}_userHistory.user"),