From 3d412d6a463ef6dd35fce8f5a718c0c1b6a0d05c Mon Sep 17 00:00:00 2001 From: Dave Mc Nicoll Date: Wed, 25 Feb 2026 19:15:11 +0000 Subject: [PATCH] - Defined sets() as chainable --- src/Method/FormContext.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Method/FormContext.php b/src/Method/FormContext.php index ee7b4c2..4c219c3 100644 --- a/src/Method/FormContext.php +++ b/src/Method/FormContext.php @@ -147,11 +147,13 @@ class FormContext implements FormContextInterface return $this->formContextValues[$key] = $value; } - public function sets(array $values) : void + public function sets(array $values) : static { foreach($values as $key =>$value) { $this->set($key, $value); } + + return $this; } @@ -164,7 +166,7 @@ class FormContext implements FormContextInterface { return array_key_exists($key, $this->formContextValues); } - + public function pushMessage(FormMessage $message) : void { $this->formContextMessages[] = $message;