phpstan en rector fixes

This commit is contained in:
2024-05-22 16:42:47 +02:00
parent 2895638f3b
commit 9ce1788a14
16 changed files with 75 additions and 107 deletions

View File

@@ -725,10 +725,8 @@ class CRUDController extends AbstractController
* and view.
*
* @param string $action
* @param mixed $entity the entity for the current request, or an array of entities
*
* @return string the path to the template
*
* @throws \LogicException if no template are available
*/
protected function getTemplateFor($action, mixed $entity, Request $request)

View File

@@ -442,8 +442,6 @@ final class PermissionsGroupController extends AbstractController
/**
* Creates a form to delete a link to roleScope.
*
* @param mixed $permissionsGroup The entity id
*/
private function createDeleteRoleScopeForm(
PermissionsGroup $permissionsGroup,

View File

@@ -73,7 +73,6 @@ interface AggregatorInterface extends ModifierInterface
*
* @param string $key The column key, as added in the query
* @param mixed[] $values The values from the result. if there are duplicates, those might be given twice. Example: array('FR', 'BE', 'CZ', 'FR', 'BE', 'FR')
* @param mixed $data The data from the export's form (as defined in `buildForm`
*
* @return \Closure where the first argument is the value, and the function should return the label to show in the formatted file. Example : `function($countryCode) use ($countries) { return $countries[$countryCode]->getName(); }`
*/

View File

@@ -30,8 +30,6 @@ interface ExportElementValidatedInterface
/**
* validate the form's data and, if required, build a contraint
* violation on the data.
*
* @param mixed $data the data, as returned by the user
*/
public function validateForm(mixed $data, ExecutionContextInterface $context);
}

View File

@@ -96,7 +96,6 @@ interface ExportInterface extends ExportElementInterface
*
* @param string $key The column key, as added in the query
* @param mixed[] $values The values from the result. if there are duplicates, those might be given twice. Example: array('FR', 'BE', 'CZ', 'FR', 'BE', 'FR')
* @param mixed $data The data from the export's form (as defined in `buildForm`)
*
* @return (callable(string|int|float|'_header'|null $value): string|int|\DateTimeInterface) where the first argument is the value, and the function should return the label to show in the formatted file. Example : `function($countryCode) use ($countries) { return $countries[$countryCode]->getName(); }`
*/

View File

@@ -552,9 +552,7 @@ class ExportManager
*
* This function check the acl.
*
* @param mixed $data the data under the initial 'filters' data
* @param \Chill\MainBundle\Entity\Center[] $centers the picked centers
*
* @throw UnauthorizedHttpException if the user is not authorized
*/
private function handleFilters(
@@ -615,9 +613,6 @@ class ExportManager
return $usedTypes;
}
/**
* @param mixed $data the data from the filter key of the ExportType
*/
private function retrieveUsedFilters(mixed $data): iterable
{
if (null === $data) {
@@ -634,7 +629,6 @@ class ExportManager
/**
* Retrieve the filter used in this export.
*
* @param mixed $data the data from the `filters` key of the ExportType
*
* @return array an array with types
*/

View File

@@ -257,10 +257,10 @@ class SearchProvider
$this->mustBeExtracted[] = $matches[0][$key];
// strip parenthesis
if (
'"' === mb_substr((string) $match, 0, 1)
&& '"' === mb_substr((string) $match, mb_strlen((string) $match) - 1)
'"' === mb_substr($match, 0, 1)
&& '"' === mb_substr($match, mb_strlen($match) - 1)
) {
$match = trim(mb_substr((string) $match, 1, mb_strlen((string) $match) - 2));
$match = trim(mb_substr($match, 1, mb_strlen($match) - 2));
}
$terms[$matches[1][$key]] = $match;
}

View File

@@ -198,7 +198,6 @@ class AuthorizationHelper implements AuthorizationHelperInterface
* if the entity implements Chill\MainBundle\Entity\HasScopeInterface,
* the scope is taken into account.
*
* @param mixed $entity the entity may also implement HasScopeInterface
*
* @return bool true if the user has access
*/