mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-30 19:43:49 +00:00
apply rules rector
This commit is contained in:
@@ -28,7 +28,6 @@ final readonly class FilterOrderGetActiveFilterHelper
|
||||
/**
|
||||
* Return all the data required to display the active filters
|
||||
*
|
||||
* @param FilterOrderHelper $filterOrderHelper
|
||||
* @return array<array{label: string, value: string, position: string, name: string}>
|
||||
*/
|
||||
public function getActiveFilters(FilterOrderHelper $filterOrderHelper): array
|
||||
@@ -65,7 +64,7 @@ final readonly class FilterOrderGetActiveFilterHelper
|
||||
$value = $this->propertyAccessor->getValue($selected, $options['choice_label']);
|
||||
} else {
|
||||
if (!$selected instanceof \Stringable) {
|
||||
throw new \UnexpectedValueException(sprintf("we are not able to transform the value of %s to a string. Implements \\Stringable or add a 'choice_label' option to the filterFormBuilder", get_class($selected)));
|
||||
throw new \UnexpectedValueException(sprintf("we are not able to transform the value of %s to a string. Implements \\Stringable or add a 'choice_label' option to the filterFormBuilder", $selected::class));
|
||||
}
|
||||
|
||||
$value = (string)$selected;
|
||||
|
@@ -23,10 +23,6 @@ class FilterOrderHelperBuilder
|
||||
|
||||
private array $dateRanges = [];
|
||||
|
||||
private FormFactoryInterface $formFactory;
|
||||
|
||||
private RequestStack $requestStack;
|
||||
|
||||
private ?array $searchBoxFields = null;
|
||||
|
||||
/**
|
||||
@@ -44,12 +40,8 @@ class FilterOrderHelperBuilder
|
||||
*/
|
||||
private array $userPickers = [];
|
||||
|
||||
public function __construct(
|
||||
FormFactoryInterface $formFactory,
|
||||
RequestStack $requestStack,
|
||||
) {
|
||||
$this->formFactory = $formFactory;
|
||||
$this->requestStack = $requestStack;
|
||||
public function __construct(private FormFactoryInterface $formFactory, private RequestStack $requestStack)
|
||||
{
|
||||
}
|
||||
|
||||
public function addSingleCheckbox(string $name, string $label): self
|
||||
|
@@ -18,16 +18,8 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
class FilterOrderHelperFactory implements FilterOrderHelperFactoryInterface
|
||||
{
|
||||
private FormFactoryInterface $formFactory;
|
||||
|
||||
private RequestStack $requestStack;
|
||||
|
||||
public function __construct(
|
||||
FormFactoryInterface $formFactory,
|
||||
RequestStack $requestStack,
|
||||
) {
|
||||
$this->formFactory = $formFactory;
|
||||
$this->requestStack = $requestStack;
|
||||
public function __construct(private FormFactoryInterface $formFactory, private RequestStack $requestStack)
|
||||
{
|
||||
}
|
||||
|
||||
public function create(string $context, ?array $options = []): FilterOrderHelperBuilder
|
||||
|
Reference in New Issue
Block a user