mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
fix issues from master
This commit is contained in:
parent
d9dd8d7317
commit
841bdb0ebf
@ -11,8 +11,8 @@ declare(strict_types=1);
|
||||
|
||||
namespace Chill\MainBundle\Search;
|
||||
|
||||
use Chill\MainBundle\Pagination\Paginator;
|
||||
use Chill\MainBundle\Pagination\PaginatorFactory;
|
||||
use Chill\MainBundle\Pagination\PaginatorInterface;
|
||||
use Chill\MainBundle\Serializer\Model\Collection;
|
||||
use Doctrine\DBAL\Types\Types;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
@ -100,7 +100,7 @@ class SearchApi
|
||||
return $items;
|
||||
}
|
||||
|
||||
private function buildUnionQuery(array $queries, Paginator $paginator): array
|
||||
private function buildUnionQuery(array $queries, PaginatorInterface $paginator): array
|
||||
{
|
||||
$query = '{unions} ORDER BY pertinence DESC LIMIT ? OFFSET ?';
|
||||
$unions = [];
|
||||
@ -134,7 +134,7 @@ class SearchApi
|
||||
return (int) $countNq->getSingleScalarResult();
|
||||
}
|
||||
|
||||
private function fetchRawResult($queries, $types, Paginator $paginator): array
|
||||
private function fetchRawResult($queries, $types, PaginatorInterface $paginator): array
|
||||
{
|
||||
[$union, $parameters] = $this->buildUnionQuery($queries, $paginator);
|
||||
$rsm = new ResultSetMappingBuilder($this->em);
|
||||
|
@ -63,7 +63,6 @@ class AuthorizationHelper implements AuthorizationHelperInterface
|
||||
*
|
||||
* @param User $user The user
|
||||
* @param array $centers a list of centers which are going to be filtered
|
||||
* @param string $role
|
||||
*/
|
||||
public function filterReachableCenters(User $user, array $centers, $role): array
|
||||
{
|
||||
@ -197,10 +196,6 @@ class AuthorizationHelper implements AuthorizationHelperInterface
|
||||
*/
|
||||
public function getReachableScopes(UserInterface $user, string $role, Center|array $center): array
|
||||
{
|
||||
if ($role instanceof Role) {
|
||||
$role = $role->getRole();
|
||||
}
|
||||
|
||||
return $this->getReachableCircles($user, $role, $center);
|
||||
}
|
||||
|
||||
|
@ -64,8 +64,6 @@ final class PersonController extends AbstractController
|
||||
*/
|
||||
protected $personRepository;
|
||||
|
||||
private Security $security;
|
||||
|
||||
/**
|
||||
* @var SimilarPersonMatcher
|
||||
*/
|
||||
@ -101,7 +99,6 @@ final class PersonController extends AbstractController
|
||||
LoggerInterface $logger,
|
||||
ValidatorInterface $validator,
|
||||
EntityManagerInterface $em,
|
||||
Security $security
|
||||
) {
|
||||
$this->authorizationHelper = $authorizationHelper;
|
||||
$this->similarPersonMatcher = $similarPersonMatcher;
|
||||
@ -112,7 +109,6 @@ final class PersonController extends AbstractController
|
||||
$this->logger = $logger;
|
||||
$this->validator = $validator;
|
||||
$this->em = $em;
|
||||
$this->security = $security;
|
||||
}
|
||||
|
||||
public function editAction($person_id, Request $request)
|
||||
|
Loading…
x
Reference in New Issue
Block a user