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

@@ -18,7 +18,6 @@ use Chill\PersonBundle\Security\Authorization\PersonVoter;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\Query;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Security\Core\Role\Role;
class CountPerson implements ExportInterface
{
@@ -73,9 +72,9 @@ class CountPerson implements ExportInterface
return ['export_result'];
}
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()
@@ -106,9 +105,9 @@ class CountPerson implements ExportInterface
return $qb;
}
public function requiredRole()
public function requiredRole(): string
{
return new Role(PersonVoter::STATS);
return PersonVoter::STATS;
}
public function supportsModifiers()