Skip to content

Commit 5c258fa

Browse files
authored
Merge pull request #14 from MaplePHP/develop
fix: setValue should be chainable
2 parents 13a9080 + df351ed commit 5c258fa

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

composer.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,10 @@
3535
"MaplePHP\\Validate\\": "src"
3636
}
3737
},
38+
"extra": {
39+
"branch-alias": {
40+
"dev-main": "2.x-dev"
41+
}
42+
},
3843
"minimum-stability": "dev"
3944
}

src/ValidationChain.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,11 +253,12 @@ public function val(): mixed
253253
* Set a value
254254
*
255255
* @param mixed $value
256-
* @return void
256+
* @return self
257257
*/
258-
public function setValue(mixed $value): void
258+
public function setValue(mixed $value): self
259259
{
260260
$this->value = $value;
261+
return $this;
261262
}
262263

263264
/**

0 commit comments

Comments
 (0)