mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-22 15:43:51 +00:00
Apply rector rules + fix CS
This commit is contained in:
@@ -318,7 +318,7 @@ class ChillImportUsersCommand extends Command
|
||||
return '';
|
||||
}
|
||||
|
||||
return trim($value);
|
||||
return trim((string) $value);
|
||||
});
|
||||
$helper = $this->getHelper('question');
|
||||
|
||||
|
@@ -68,9 +68,8 @@ class ExportController extends AbstractController
|
||||
|
||||
/**
|
||||
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/exports/download/{alias}", name="chill_main_export_download", methods={"GET"})
|
||||
* @param mixed $alias
|
||||
*/
|
||||
public function downloadResultAction(Request $request, $alias)
|
||||
public function downloadResultAction(Request $request, mixed $alias)
|
||||
{
|
||||
/** @var \Chill\MainBundle\Export\ExportManager $exportManager */
|
||||
$exportManager = $this->exportManager;
|
||||
|
@@ -42,9 +42,8 @@ class SearchController extends AbstractController
|
||||
|
||||
/**
|
||||
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/search/advanced/{name}", name="chill_main_advanced_search")
|
||||
* @param mixed $name
|
||||
*/
|
||||
public function advancedSearchAction($name, Request $request)
|
||||
public function advancedSearchAction(mixed $name, Request $request)
|
||||
{
|
||||
try {
|
||||
/** @var Chill\MainBundle\Search\SearchProvider $variable */
|
||||
@@ -110,9 +109,8 @@ class SearchController extends AbstractController
|
||||
|
||||
/**
|
||||
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/search.{_format}", name="chill_main_search", requirements={"_format"="html|json"}, defaults={"_format"="html"})
|
||||
* @param mixed $_format
|
||||
*/
|
||||
public function searchAction(Request $request, $_format)
|
||||
public function searchAction(Request $request, mixed $_format)
|
||||
{
|
||||
$pattern = trim((string) $request->query->get('q', ''));
|
||||
|
||||
@@ -203,9 +201,8 @@ class SearchController extends AbstractController
|
||||
|
||||
/**
|
||||
* @\Symfony\Component\Routing\Annotation\Route(path="/api/1.0/search.{_format}", name="chill_main_search_global", requirements={"_format"="json"}, defaults={"_format"="json"})
|
||||
* @param mixed $_format
|
||||
*/
|
||||
public function searchApi(Request $request, $_format): JsonResponse
|
||||
public function searchApi(Request $request, mixed $_format): JsonResponse
|
||||
{
|
||||
//TODO this is an incomplete implementation
|
||||
$query = $request->query->get('q', '');
|
||||
|
@@ -29,7 +29,7 @@ class AggregateStringHelper
|
||||
|
||||
return implode(
|
||||
'|',
|
||||
json_decode($value, true, 512, JSON_THROW_ON_ERROR)
|
||||
json_decode((string) $value, true, 512, JSON_THROW_ON_ERROR)
|
||||
);
|
||||
};
|
||||
}
|
||||
|
@@ -292,7 +292,7 @@ class ExportAddressHelper
|
||||
return '';
|
||||
}
|
||||
|
||||
return $this->translatableStringHelper->localize(json_decode($value, true, 512, JSON_THROW_ON_ERROR));
|
||||
return $this->translatableStringHelper->localize(json_decode((string) $value, true, 512, JSON_THROW_ON_ERROR));
|
||||
};
|
||||
|
||||
case 'isNoAddress':
|
||||
@@ -351,7 +351,7 @@ class ExportAddressHelper
|
||||
return '';
|
||||
}
|
||||
|
||||
$decodedValues = json_decode($value, true, 512, JSON_THROW_ON_ERROR);
|
||||
$decodedValues = json_decode((string) $value, true, 512, JSON_THROW_ON_ERROR);
|
||||
|
||||
return match (count($decodedValues)) {
|
||||
0 => '',
|
||||
|
@@ -36,7 +36,7 @@ class TranslatableStringExportLabelHelper
|
||||
return '';
|
||||
}
|
||||
|
||||
return $this->translatableStringHelper->localize(json_decode($value, true, 512, JSON_THROW_ON_ERROR));
|
||||
return $this->translatableStringHelper->localize(json_decode((string) $value, true, 512, JSON_THROW_ON_ERROR));
|
||||
};
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ class TranslatableStringExportLabelHelper
|
||||
return '';
|
||||
}
|
||||
|
||||
$decoded = json_decode($value, true, 512, JSON_THROW_ON_ERROR);
|
||||
$decoded = json_decode((string) $value, true, 512, JSON_THROW_ON_ERROR);
|
||||
|
||||
return implode(
|
||||
'|',
|
||||
|
@@ -48,7 +48,7 @@ class UserHelper
|
||||
return '';
|
||||
}
|
||||
|
||||
$decoded = json_decode($value, null, 512, JSON_THROW_ON_ERROR);
|
||||
$decoded = json_decode((string) $value, null, 512, JSON_THROW_ON_ERROR);
|
||||
|
||||
if (0 === count($decoded)) {
|
||||
return '';
|
||||
|
Reference in New Issue
Block a user