mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
DX: fix phpstan errors
This commit is contained in:
@@ -44,14 +44,7 @@ class UrgencyAggregator implements AggregatorInterface
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
{
|
||||
$qb->addSelect('cal.urgent AS urgency_aggregator');
|
||||
|
||||
$groupBy = $qb->getDQLPart('groupBy');
|
||||
|
||||
if (!empty($groupBy)) {
|
||||
$qb->addGroupBy('urgency_aggregator');
|
||||
} else {
|
||||
$qb->groupBy('urgency_aggregator');
|
||||
}
|
||||
$qb->addGroupBy('urgency_aggregator');
|
||||
}
|
||||
|
||||
public function applyOn(): string
|
||||
|
@@ -49,23 +49,11 @@ class CalendarRangeFilter implements FilterInterface
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
{
|
||||
$where = $qb->getDQLPart('where');
|
||||
|
||||
dump($data);
|
||||
|
||||
if ($data['hasCalendarRange']) {
|
||||
$clause = $qb->expr()->isNotNull('cal.calendarRange');
|
||||
if (null !== $data['hasCalendarRange']) {
|
||||
$qb->andWhere($qb->expr()->isNotNull('cal.calendarRange'));
|
||||
} else {
|
||||
$clause = $qb->expr()->isNull('cal.calendarRange');
|
||||
$qb->andWhere($qb->expr()->isNull('cal.calendarRange'));
|
||||
}
|
||||
|
||||
if ($where instanceof Andx) {
|
||||
$where->add($clause);
|
||||
} else {
|
||||
$where = $qb->expr()->andX($clause);
|
||||
}
|
||||
|
||||
$qb->add('where', $where);
|
||||
}
|
||||
|
||||
public function applyOn(): string
|
||||
@@ -87,6 +75,8 @@ class CalendarRangeFilter implements FilterInterface
|
||||
|
||||
public function describeAction($data, $format = 'string'): array
|
||||
{
|
||||
$choice = '';
|
||||
|
||||
foreach (self::CHOICES as $k => $v) {
|
||||
if ($v === $data['hasCalendarRange']) {
|
||||
$choice = $k;
|
||||
|
Reference in New Issue
Block a user