@@ 86-101 (lines=16) @@ | ||
83 | /** |
|
84 | * @inheritdoc |
|
85 | */ |
|
86 | public function toBlock(): ExecutionBlockInterface |
|
87 | { |
|
88 | $operator = new IfOperator( |
|
89 | [static::class, 'compare'], |
|
90 | new Success(), |
|
91 | new Fail($this->getErrorCode(), $this->getMessageTemplate(), $this->getMessageParameters()), |
|
92 | [static::PROPERTY_VALUE => $this->getValue()] |
|
93 | ); |
|
94 | ||
95 | $operator->setParent($this); |
|
96 | if ($this->isCaptureEnabled() === true) { |
|
97 | $operator->enableCapture(); |
|
98 | } |
|
99 | ||
100 | return $operator->toBlock(); |
|
101 | } |
|
102 | ||
103 | /** |
|
104 | * @return mixed |
@@ 95-113 (lines=19) @@ | ||
92 | /** |
|
93 | * @inheritdoc |
|
94 | */ |
|
95 | public function toBlock(): ExecutionBlockInterface |
|
96 | { |
|
97 | $operator = new IfOperator( |
|
98 | [static::class, 'compare'], |
|
99 | new Success(), |
|
100 | new Fail($this->getErrorCode(), $this->getMessageTemplate(), $this->getMessageParameters()), |
|
101 | [ |
|
102 | static::PROPERTY_LOWER_VALUE => $this->getLowerValue(), |
|
103 | static::PROPERTY_UPPER_VALUE => $this->getUpperValue(), |
|
104 | ] |
|
105 | ); |
|
106 | ||
107 | $operator->setParent($this); |
|
108 | if ($this->isCaptureEnabled() === true) { |
|
109 | $operator->enableCapture(); |
|
110 | } |
|
111 | ||
112 | return $operator->toBlock(); |
|
113 | } |
|
114 | ||
115 | /** |
|
116 | * @return mixed |