diff --git a/src/Plugin/Filtering/Builder/Reject.php b/src/Plugin/Filtering/Builder/Reject.php index a84ded29..a59b9257 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 $serialize_rejection = null; + private ?Node\Expr $rejection_serializer = null; /** @var list */ private array $exclusions = []; @@ -43,9 +43,9 @@ public function withState(Node\Expr $state): self return $this; } - public function withSerialiazeRejection(Node\Expr $serialize_rejection): self + public function withRejectionSerializer(Node\Expr $rejection_serializer): self { - $this->serialize_rejection = $serialize_rejection; + $this->rejection_serializer = $rejection_serializer; return $this; } @@ -133,7 +133,7 @@ class: new Node\Stmt\Class_(null, [ new Node\Expr\New_( new Node\Name\FullyQualified(RejectionResultBucket::class), [ - null !== $this->serialize_rejection ? new Node\Arg($this->serialize_rejection) : new Node\Arg(new Node\Expr\Variable('input')), + null !== $this->rejection_serializer ? new Node\Arg($this->rejection_serializer) : 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 ace4c919..d08f422a 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('serialize_rejection') + ->scalarNode('rejection_serializer') ->cannotBeEmpty() ->validate() ->ifTrue(isExpression()) diff --git a/src/Plugin/Filtering/Factory/Reject.php b/src/Plugin/Filtering/Factory/Reject.php index d809c5b5..8641636a 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('serialize_rejection', $condition)) { - $builder->withSerialiazeRejection(compileExpression($interpreter, $condition['serialize_rejection'])); + if (\array_key_exists('rejection_serializer', $condition)) { + $builder->withRejectionSerializer(compileExpression($interpreter, $condition['rejection_serializer'])); } }