diff --git a/src/Component/Action/ModifierAction.php b/src/Component/Action/ModifierAction.php index 0ab8e86f..2a07c79a 100644 --- a/src/Component/Action/ModifierAction.php +++ b/src/Component/Action/ModifierAction.php @@ -26,7 +26,7 @@ class ModifierAction implements OptionsInterface /** @var array */ private $options = [ 'modifier' => null, - 'format' => null, + 'formatter' => null, 'keys' => null, ]; @@ -55,7 +55,7 @@ public function apply($item) } $item[$key] = $modifier->modify($listItem); } - if (null !== $listItem && $this->options['format'] && $formatter = $this->getFormatter($this->options['format'])) { + if (null !== $listItem && $this->options['formatter'] && $formatter = $this->getFormatter($this->options['formatter'])) { if (is_array($listItem)) { $item[$key] = array_map(function ($itemValue) use ($formatter) { return is_string($itemValue) ? $formatter->format($itemValue) : $formatter->reverseFormat($itemValue); diff --git a/tests/Component/Action/ModifierActionTest.php b/tests/Component/Action/ModifierActionTest.php index 5c6d67b2..612b47b0 100644 --- a/tests/Component/Action/ModifierActionTest.php +++ b/tests/Component/Action/ModifierActionTest.php @@ -162,7 +162,7 @@ public function test_it_should_format_a_boolean_action(): void $action->setOptions( [ - 'format' => 'boolean', + 'formatter' => 'boolean', 'keys' => 'active', 'true' => 'TRUE', 'false' => 'FALSE',