@@ -31,7 +31,7 @@ final class Result
3131
3232 /** @param array<string, mixed> $parameters */
3333 public function __construct (
34- public readonly bool $ isValid ,
34+ public readonly bool $ hasPassed ,
3535 public readonly mixed $ input ,
3636 public readonly Rule $ rule ,
3737 public readonly array $ parameters = [],
@@ -77,7 +77,7 @@ public static function fromAdjacent(
7777 string $ template = Rule::TEMPLATE_STANDARD
7878 ): Result {
7979 if ($ adjacent ->allowsAdjacent ()) {
80- return (new Result ($ adjacent ->isValid , $ input , $ rule , $ parameters , $ template , id: $ adjacent ->id ))
80+ return (new Result ($ adjacent ->hasPassed , $ input , $ rule , $ parameters , $ template , id: $ adjacent ->id ))
8181 ->withPrefix ($ prefix )
8282 ->withAdjacent ($ adjacent ->withInput ($ input ));
8383 }
@@ -202,7 +202,7 @@ public function withAdjacent(Result $adjacent): self
202202 public function withToggledValidation (): self
203203 {
204204 return $ this ->clone (
205- isValid : !$ this ->isValid ,
205+ hasPassed : !$ this ->hasPassed ,
206206 adjacent: $ this ->adjacent ?->withToggledValidation(),
207207 children: array_map (static fn (Result $ child ) => $ child ->withToggledValidation (), $ this ->children ),
208208 );
@@ -211,7 +211,7 @@ public function withToggledValidation(): self
211211 public function withToggledModeAndValidation (): self
212212 {
213213 return $ this ->clone (
214- isValid : !$ this ->isValid ,
214+ hasPassed : !$ this ->hasPassed ,
215215 mode: !$ this ->hasInvertedMode ,
216216 adjacent: $ this ->adjacent ?->withToggledModeAndValidation(),
217217 children: array_map (static fn (Result $ child ) => $ child ->withToggledModeAndValidation (), $ this ->children ),
@@ -242,7 +242,7 @@ public function allowsAdjacent(): bool
242242 * @param array<Result>|null $children
243243 */
244244 private function clone (
245- ?bool $ isValid = null ,
245+ ?bool $ hasPassed = null ,
246246 mixed $ input = null ,
247247 ?array $ parameters = null ,
248248 ?string $ template = null ,
@@ -254,7 +254,7 @@ private function clone(
254254 ?array $ children = null
255255 ): self {
256256 return new self (
257- $ isValid ?? $ this ->isValid ,
257+ $ hasPassed ?? $ this ->hasPassed ,
258258 $ input ?? $ this ->input ,
259259 $ this ->rule ,
260260 $ parameters ?? $ this ->parameters ,
0 commit comments