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:
2022-10-06 22:56:34 +02:00
parent 77800c21bb
commit 9ad9ef6758
18 changed files with 45 additions and 39 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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()

View File

@@ -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