mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-10-25 06:32:50 +00:00
apply more cs rules for php-cs
This commit is contained in:
@@ -14,10 +14,8 @@ namespace Chill\PersonBundle\Export\Aggregator\EvaluationAggregators;
|
||||
use Chill\MainBundle\Export\AggregatorInterface;
|
||||
use Chill\PersonBundle\Export\Declarations;
|
||||
use Doctrine\ORM\QueryBuilder;
|
||||
use LogicException;
|
||||
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
final class ByEndDateAggregator implements AggregatorInterface
|
||||
{
|
||||
@@ -40,7 +38,7 @@ final class ByEndDateAggregator implements AggregatorInterface
|
||||
'week' => 'YYYY-IW',
|
||||
'month' => 'YYYY-MM',
|
||||
'year' => 'YYYY',
|
||||
default => throw new LogicException(sprintf("The frequency data '%s' is invalid.", $data['frequency'])),
|
||||
default => throw new \LogicException(sprintf("The frequency data '%s' is invalid.", $data['frequency'])),
|
||||
};
|
||||
|
||||
$qb->addSelect(sprintf("TO_CHAR(workeval.endDate, '%s') AS eval_by_end_date_aggregator", $fmt));
|
||||
@@ -62,6 +60,7 @@ final class ByEndDateAggregator implements AggregatorInterface
|
||||
'empty_data' => self::DEFAULT_CHOICE,
|
||||
]);
|
||||
}
|
||||
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
return ['frequency' => self::DEFAULT_CHOICE];
|
||||
|
||||
@@ -14,10 +14,8 @@ namespace Chill\PersonBundle\Export\Aggregator\EvaluationAggregators;
|
||||
use Chill\MainBundle\Export\AggregatorInterface;
|
||||
use Chill\PersonBundle\Export\Declarations;
|
||||
use Doctrine\ORM\QueryBuilder;
|
||||
use LogicException;
|
||||
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
final class ByMaxDateAggregator implements AggregatorInterface
|
||||
{
|
||||
@@ -40,7 +38,7 @@ final class ByMaxDateAggregator implements AggregatorInterface
|
||||
'week' => 'YYYY-IW',
|
||||
'month' => 'YYYY-MM',
|
||||
'year' => 'YYYY',
|
||||
default => throw new LogicException(sprintf("The frequency data '%s' is invalid.", $data['frequency'])),
|
||||
default => throw new \LogicException(sprintf("The frequency data '%s' is invalid.", $data['frequency'])),
|
||||
};
|
||||
|
||||
$qb->addSelect(sprintf("TO_CHAR(workeval.maxDate, '%s') AS eval_by_max_date_aggregator", $fmt));
|
||||
@@ -62,6 +60,7 @@ final class ByMaxDateAggregator implements AggregatorInterface
|
||||
'empty_data' => self::DEFAULT_CHOICE,
|
||||
]);
|
||||
}
|
||||
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
return ['frequency' => self::DEFAULT_CHOICE];
|
||||
|
||||
@@ -14,10 +14,8 @@ namespace Chill\PersonBundle\Export\Aggregator\EvaluationAggregators;
|
||||
use Chill\MainBundle\Export\AggregatorInterface;
|
||||
use Chill\PersonBundle\Export\Declarations;
|
||||
use Doctrine\ORM\QueryBuilder;
|
||||
use LogicException;
|
||||
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
final class ByStartDateAggregator implements AggregatorInterface
|
||||
{
|
||||
@@ -40,7 +38,7 @@ final class ByStartDateAggregator implements AggregatorInterface
|
||||
'week' => 'YYYY-IW',
|
||||
'month' => 'YYYY-MM',
|
||||
'year' => 'YYYY',
|
||||
default => throw new LogicException(sprintf("The frequency data '%s' is invalid.", $data['frequency'])),
|
||||
default => throw new \LogicException(sprintf("The frequency data '%s' is invalid.", $data['frequency'])),
|
||||
};
|
||||
|
||||
$qb->addSelect(sprintf("TO_CHAR(workeval.startDate, '%s') AS eval_by_start_date_aggregator", $fmt));
|
||||
@@ -62,6 +60,7 @@ final class ByStartDateAggregator implements AggregatorInterface
|
||||
'empty_data' => self::DEFAULT_CHOICE,
|
||||
]);
|
||||
}
|
||||
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
return ['frequency' => self::DEFAULT_CHOICE];
|
||||
|
||||
@@ -42,6 +42,7 @@ class EvaluationTypeAggregator implements AggregatorInterface
|
||||
{
|
||||
// no form
|
||||
}
|
||||
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
return [];
|
||||
|
||||
@@ -14,7 +14,6 @@ namespace Chill\PersonBundle\Export\Aggregator\EvaluationAggregators;
|
||||
use Chill\MainBundle\Export\AggregatorInterface;
|
||||
use Chill\PersonBundle\Export\Declarations;
|
||||
use Doctrine\ORM\QueryBuilder;
|
||||
use LogicException;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
@@ -43,6 +42,7 @@ class HavingEndDateAggregator implements AggregatorInterface
|
||||
{
|
||||
// No form needed
|
||||
}
|
||||
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
return [];
|
||||
@@ -58,7 +58,7 @@ class HavingEndDateAggregator implements AggregatorInterface
|
||||
return match ($value) {
|
||||
true => $this->translator->trans('export.aggregator.eval.by_end_date.enddate is specified'),
|
||||
false => $this->translator->trans('export.aggregator.eval.by_end_date.enddate is not specified'),
|
||||
default => throw new LogicException(sprintf('The value %s is not valid', $value)),
|
||||
default => throw new \LogicException(sprintf('The value %s is not valid', $value)),
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user