mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
DX: rename argument $qb to $query in export's, getResult
method, and add missing return type and import
This name is the same as the implemented interface.
This commit is contained in:
@@ -69,9 +69,9 @@ class AvgActivityDuration implements ExportInterface, GroupedExportInterface
|
||||
return ['export_avg_activity_duration'];
|
||||
}
|
||||
|
||||
public function getResult($qb, $data)
|
||||
public function getResult($query, $data)
|
||||
{
|
||||
return $qb->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
||||
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
||||
}
|
||||
|
||||
public function getTitle(): string
|
||||
|
@@ -70,9 +70,9 @@ class AvgActivityVisitDuration implements ExportInterface, GroupedExportInterfac
|
||||
return ['export_avg_activity_visit_duration'];
|
||||
}
|
||||
|
||||
public function getResult($qb, $data)
|
||||
public function getResult($query, $data)
|
||||
{
|
||||
return $qb->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
||||
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
||||
}
|
||||
|
||||
public function getTitle(): string
|
||||
|
@@ -69,9 +69,9 @@ class CountActivity implements ExportInterface, GroupedExportInterface
|
||||
return ['export_count_activity'];
|
||||
}
|
||||
|
||||
public function getResult($qb, $data)
|
||||
public function getResult($query, $data)
|
||||
{
|
||||
return $qb->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
||||
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
||||
}
|
||||
|
||||
public function getTitle(): string
|
||||
|
@@ -70,9 +70,9 @@ class SumActivityDuration implements ExportInterface, GroupedExportInterface
|
||||
return ['export_sum_activity_duration'];
|
||||
}
|
||||
|
||||
public function getResult($qb, $data)
|
||||
public function getResult($query, $data)
|
||||
{
|
||||
return $qb->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
||||
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
||||
}
|
||||
|
||||
public function getTitle(): string
|
||||
|
@@ -70,9 +70,9 @@ class SumActivityVisitDuration implements ExportInterface, GroupedExportInterfac
|
||||
return ['export_sum_activity_visit_duration'];
|
||||
}
|
||||
|
||||
public function getResult($qb, $data)
|
||||
public function getResult($query, $data)
|
||||
{
|
||||
return $qb->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
||||
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
||||
}
|
||||
|
||||
public function getTitle(): string
|
||||
|
@@ -65,9 +65,9 @@ class CountActivity implements ExportInterface, GroupedExportInterface
|
||||
return ['export_count_activity'];
|
||||
}
|
||||
|
||||
public function getResult($qb, $data)
|
||||
public function getResult($query, $data)
|
||||
{
|
||||
return $qb->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
||||
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
||||
}
|
||||
|
||||
public function getTitle()
|
||||
|
@@ -64,6 +64,8 @@ class StatActivityDuration implements ExportInterface, GroupedExportInterface
|
||||
if (self::SUM === $this->action) {
|
||||
return 'Sum activities linked to a person duration by various parameters.';
|
||||
}
|
||||
|
||||
throw new LogicException('this action is not supported: ' . $this->action);
|
||||
}
|
||||
|
||||
public function getGroup(): string
|
||||
@@ -87,9 +89,9 @@ class StatActivityDuration implements ExportInterface, GroupedExportInterface
|
||||
return ['export_stat_activity'];
|
||||
}
|
||||
|
||||
public function getResult($qb, $data)
|
||||
public function getResult($query, $data)
|
||||
{
|
||||
return $qb->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
||||
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
||||
}
|
||||
|
||||
public function getTitle()
|
||||
@@ -97,6 +99,8 @@ class StatActivityDuration implements ExportInterface, GroupedExportInterface
|
||||
if (self::SUM === $this->action) {
|
||||
return 'Sum activity linked to a person duration';
|
||||
}
|
||||
|
||||
throw new LogicException('This action is not supported: ' . $this->action);
|
||||
}
|
||||
|
||||
public function getType(): string
|
||||
|
Reference in New Issue
Block a user