From 43c0ca4fd78f9a266b99f736c7efc635153b6129 Mon Sep 17 00:00:00 2001 From: BMTmohammedtaha Date: Wed, 27 Sep 2023 13:48:15 +0200 Subject: [PATCH] add method setAttributes --- src/Data/DataRules.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/Data/DataRules.php b/src/Data/DataRules.php index 16c21a7..b570fd5 100644 --- a/src/Data/DataRules.php +++ b/src/Data/DataRules.php @@ -65,6 +65,18 @@ public function setAttribute(string $key, $attribute): self return $this; } + /** + * Set an attributes. + * + * @param $attribute The attribute name to set. + * @return self + */ + public function setAttributes(array $attributes): self + { + $this->attributes = $attributes; + return $this; + } + /** * Check if a rule with the specified key exists. *