mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-27 01:53:49 +00:00
upgrade php-cs 3.49
This commit is contained in:
@@ -59,7 +59,7 @@ final class ThirdPartyController extends CRUDController
|
||||
->build();
|
||||
}
|
||||
|
||||
protected function countEntities(string $action, Request $request, FilterOrderHelper $filterOrder = null): int
|
||||
protected function countEntities(string $action, Request $request, ?FilterOrderHelper $filterOrder = null): int
|
||||
{
|
||||
if (null === $filterOrder) {
|
||||
throw new \LogicException('filterOrder should not be null');
|
||||
@@ -71,7 +71,7 @@ final class ThirdPartyController extends CRUDController
|
||||
);
|
||||
}
|
||||
|
||||
protected function createFormFor(string $action, $entity, string $formClass = null, array $formOptions = []): FormInterface
|
||||
protected function createFormFor(string $action, $entity, ?string $formClass = null, array $formOptions = []): FormInterface
|
||||
{
|
||||
if ('new' === $action) {
|
||||
return parent::createFormFor($action, $entity, $formClass, \array_merge(
|
||||
@@ -90,7 +90,7 @@ final class ThirdPartyController extends CRUDController
|
||||
return parent::createFormFor($action, $entity, $formClass, $formOptions);
|
||||
}
|
||||
|
||||
protected function getQueryResult(string $action, Request $request, int $totalItems, PaginatorInterface $paginator, FilterOrderHelper $filterOrder = null)
|
||||
protected function getQueryResult(string $action, Request $request, int $totalItems, PaginatorInterface $paginator, ?FilterOrderHelper $filterOrder = null)
|
||||
{
|
||||
return $this->thirdPartyACLAwareRepository
|
||||
->listThirdParties(
|
||||
|
@@ -655,7 +655,7 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface, \Strin
|
||||
throw new \UnexpectedValueException(sprintf('typeAndCategory should be a string or a %s', ThirdPartyCategory::class));
|
||||
}
|
||||
|
||||
public function setAcronym(string $acronym = null): ThirdParty
|
||||
public function setAcronym(?string $acronym = null): ThirdParty
|
||||
{
|
||||
$this->acronym = (string) $acronym;
|
||||
|
||||
@@ -679,7 +679,7 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface, \Strin
|
||||
/**
|
||||
* @return $this
|
||||
*/
|
||||
public function setAddress(Address $address = null)
|
||||
public function setAddress(?Address $address = null)
|
||||
{
|
||||
$this->address = $address;
|
||||
|
||||
@@ -716,7 +716,7 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface, \Strin
|
||||
*
|
||||
* @return ThirdParty
|
||||
*/
|
||||
public function setComment(string $comment = null)
|
||||
public function setComment(?string $comment = null)
|
||||
{
|
||||
$this->comment = $comment;
|
||||
|
||||
@@ -754,7 +754,7 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface, \Strin
|
||||
*
|
||||
* @return ThirdParty
|
||||
*/
|
||||
public function setEmail(string $email = null)
|
||||
public function setEmail(?string $email = null)
|
||||
{
|
||||
$this->email = trim((string) $email);
|
||||
|
||||
@@ -806,7 +806,7 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface, \Strin
|
||||
/**
|
||||
* Set telephone.
|
||||
*/
|
||||
public function setTelephone(PhoneNumber $telephone = null): self
|
||||
public function setTelephone(?PhoneNumber $telephone = null): self
|
||||
{
|
||||
$this->telephone = $telephone;
|
||||
|
||||
|
@@ -21,7 +21,7 @@ final readonly class ThirdPartyACLAwareRepository implements ThirdPartyACLAwareR
|
||||
{
|
||||
}
|
||||
|
||||
public function buildQuery(string $filterString = null): QueryBuilder
|
||||
public function buildQuery(?string $filterString = null): QueryBuilder
|
||||
{
|
||||
$qb = $this->thirdPartyRepository->createQueryBuilder('tp');
|
||||
|
||||
@@ -53,8 +53,8 @@ final readonly class ThirdPartyACLAwareRepository implements ThirdPartyACLAwareR
|
||||
string $role,
|
||||
?string $filterString,
|
||||
?array $orderBy = [],
|
||||
int $limit = null,
|
||||
int $offset = null
|
||||
?int $limit = null,
|
||||
?int $offset = null
|
||||
): array {
|
||||
$qb = $this->buildQuery($filterString);
|
||||
|
||||
|
@@ -38,7 +38,7 @@ class ThirdPartyRepository implements ObjectRepository
|
||||
return $qb->getQuery()->getSingleScalarResult();
|
||||
}
|
||||
|
||||
public function createQueryBuilder(string $alias, string $indexBy = null): QueryBuilder
|
||||
public function createQueryBuilder(string $alias, ?string $indexBy = null): QueryBuilder
|
||||
{
|
||||
return $this->repository->createQueryBuilder($alias, $indexBy);
|
||||
}
|
||||
@@ -62,7 +62,7 @@ class ThirdPartyRepository implements ObjectRepository
|
||||
*
|
||||
* @return array|ThirdParty[]
|
||||
*/
|
||||
public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null): array
|
||||
public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null): array
|
||||
{
|
||||
return $this->repository->findBy($criteria, $orderBy, $limit, $offset);
|
||||
}
|
||||
|
Reference in New Issue
Block a user