Skip to content

Commit 92cb153

Browse files
committed
Rename dataToFormat by serialize_rejection
1 parent 63a31b9 commit 92cb153

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/Plugin/Filtering/Builder/Reject.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ final class Reject implements StepBuilderInterface
1616
private ?Node\Expr $logger = null;
1717
private ?Node\Expr $rejection = null;
1818
private ?Node\Expr $state = null;
19-
private ?Node\Expr $dataToFormat = null;
19+
private ?Node\Expr $serialize_rejection = null;
2020
/** @var list<?Node\Expr> */
2121
private array $exclusions = [];
2222

@@ -43,9 +43,9 @@ public function withState(Node\Expr $state): self
4343
return $this;
4444
}
4545

46-
public function withDataToFormat(Node\Expr $dataToFormat): self
46+
public function withSerialiazeRejection(Node\Expr $serialize_rejection): self
4747
{
48-
$this->dataToFormat = $dataToFormat;
48+
$this->serialize_rejection = $serialize_rejection;
4949

5050
return $this;
5151
}
@@ -133,7 +133,7 @@ class: new Node\Stmt\Class_(null, [
133133
new Node\Expr\New_(
134134
new Node\Name\FullyQualified(RejectionResultBucket::class),
135135
[
136-
$this->dataToFormat !== null ? new Node\Arg($this->dataToFormat) : new Node\Arg(new Node\Expr\Variable('input'))
136+
$this->serialize_rejection !== null ? new Node\Arg($this->serialize_rejection) : new Node\Arg(new Node\Expr\Variable('input'))
137137
]
138138
),
139139
),

src/Plugin/Filtering/Configuration/Reject.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function getConfigTreeBuilder(): TreeBuilder
2828
->then(asExpression())
2929
->end()
3030
->end()
31-
->scalarNode('dataToFormat')
31+
->scalarNode('serialize_rejection')
3232
->cannotBeEmpty()
3333
->validate()
3434
->ifTrue(isExpression())

src/Plugin/Filtering/Factory/Reject.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ public function compile(array $config): Repository\Reject
7171
$builder->withExclusions(
7272
compileExpression($interpreter, $condition['when'])
7373
);
74-
if (array_key_exists('dataToFormat', $condition)) {
75-
$builder->withDataToFormat(compileExpression($interpreter, $condition['dataToFormat']));
74+
if (array_key_exists('serialize_rejection', $condition)) {
75+
$builder->withSerialiazeRejection(compileExpression($interpreter, $condition['serialize_rejection']));
7676
}
7777
}
7878

0 commit comments

Comments
 (0)