diff --git a/src/Plugin/Filtering/Builder/Reject.php b/src/Plugin/Filtering/Builder/Reject.php index d8fb8a45..b3779a4c 100644 --- a/src/Plugin/Filtering/Builder/Reject.php +++ b/src/Plugin/Filtering/Builder/Reject.php @@ -16,7 +16,7 @@ final class Reject implements StepBuilderInterface private ?Node\Expr $logger = null; private ?Node\Expr $rejection = null; private ?Node\Expr $state = null; - private ?Node\Expr $dataToFormat = null; + private ?Node\Expr $serialize_rejection = null; /** @var list */ private array $exclusions = []; @@ -43,9 +43,9 @@ public function withState(Node\Expr $state): self return $this; } - public function withDataToFormat(Node\Expr $dataToFormat): self + public function withSerialiazeRejection(Node\Expr $serialize_rejection): self { - $this->dataToFormat = $dataToFormat; + $this->serialize_rejection = $serialize_rejection; return $this; } @@ -133,7 +133,7 @@ class: new Node\Stmt\Class_(null, [ new Node\Expr\New_( new Node\Name\FullyQualified(RejectionResultBucket::class), [ - $this->dataToFormat !== null ? new Node\Arg($this->dataToFormat) : new Node\Arg(new Node\Expr\Variable('input')) + $this->serialize_rejection !== null ? new Node\Arg($this->serialize_rejection) : new Node\Arg(new Node\Expr\Variable('input')) ] ), ), diff --git a/src/Plugin/Filtering/Configuration/Reject.php b/src/Plugin/Filtering/Configuration/Reject.php index 8752c147..ace4c919 100644 --- a/src/Plugin/Filtering/Configuration/Reject.php +++ b/src/Plugin/Filtering/Configuration/Reject.php @@ -28,7 +28,7 @@ public function getConfigTreeBuilder(): TreeBuilder ->then(asExpression()) ->end() ->end() - ->scalarNode('dataToFormat') + ->scalarNode('serialize_rejection') ->cannotBeEmpty() ->validate() ->ifTrue(isExpression()) diff --git a/src/Plugin/Filtering/Factory/Reject.php b/src/Plugin/Filtering/Factory/Reject.php index 83c24c4c..6fc25475 100644 --- a/src/Plugin/Filtering/Factory/Reject.php +++ b/src/Plugin/Filtering/Factory/Reject.php @@ -71,8 +71,8 @@ public function compile(array $config): Repository\Reject $builder->withExclusions( compileExpression($interpreter, $condition['when']) ); - if (array_key_exists('dataToFormat', $condition)) { - $builder->withDataToFormat(compileExpression($interpreter, $condition['dataToFormat'])); + if (array_key_exists('serialize_rejection', $condition)) { + $builder->withSerialiazeRejection(compileExpression($interpreter, $condition['serialize_rejection'])); } }