fix new phpstan issues

This commit is contained in:
2023-04-11 13:04:08 +02:00
parent 841bdb0ebf
commit 4db1ff405e
7 changed files with 29 additions and 44 deletions

View File

@@ -211,7 +211,7 @@ trait AddWidgetConfigurationTrait
*
* @throws InvalidConfigurationException if a service's tag does not have the "alias" key
*
* @return type
* @return array
*/
protected function getWidgetAliasesbyPlace($place, ContainerBuilder $containerBuilder)
{

View File

@@ -31,8 +31,6 @@ class MultipleObjectsToIdTransformer implements DataTransformerInterface
* Transforms a string (id) to an object (item).
*
* @param mixed $array
*
* @return ArrayCollection
*/
public function reverseTransform($array)
{
@@ -53,10 +51,8 @@ class MultipleObjectsToIdTransformer implements DataTransformerInterface
* Transforms an object (use) to a string (id).
*
* @param array $array
*
* @return ArrayCollection
*/
public function transform($array)
public function transform($array): array
{
$ret = [];

View File

@@ -71,9 +71,9 @@ interface SearchInterface
* @param array $terms the string to search
* @param int $start the first result (for pagination)
* @param int $limit the number of result (for pagination)
* @param string $format The format for result
* @param "html"|"json" $format The format for result
*
* @return string, an HTML string
* @return string|array a string if format is html, an array if format is json
*/
public function renderResult(array $terms, $start = 0, $limit = 50, array $options = [], $format = 'html');

View File

@@ -63,6 +63,7 @@ class AuthorizationHelper implements AuthorizationHelperInterface
*
* @param User $user The user
* @param array $centers a list of centers which are going to be filtered
* @param mixed $role
*/
public function filterReachableCenters(User $user, array $centers, $role): array
{