@@ -65,7 +65,7 @@ public function isRequired(): bool
6565
6666 /**
6767 * Adds a validation rule for the current control.
68- * @param (callable(Control): bool)|string $validator
68+ * @param (callable(Control, mixed ): bool)|string $validator
6969 */
7070 public function addRule (
7171 callable |string $ validator ,
@@ -95,7 +95,7 @@ public function addRule(
9595
9696 /**
9797 * Removes a validation rule for the current control.
98- * @param (callable(Control): bool)|string $validator
98+ * @param (callable(Control, mixed ): bool)|string $validator
9999 */
100100 public function removeRule (callable |string $ validator ): static
101101 {
@@ -115,7 +115,7 @@ public function removeRule(callable|string $validator): static
115115
116116 /**
117117 * Adds a validation condition and returns new branch.
118- * @param (callable(Control): bool)|string|bool $validator
118+ * @param (callable(Control, mixed ): bool)|string|bool $validator
119119 */
120120 public function addCondition (callable |string |bool $ validator , mixed $ arg = null ): static
121121 {
@@ -132,7 +132,7 @@ public function addCondition(callable|string|bool $validator, mixed $arg = null)
132132
133133 /**
134134 * Adds a validation condition on a specified control and returns new branch.
135- * @param (callable(Control): bool)|string $validator
135+ * @param (callable(Control, mixed ): bool)|string $validator
136136 */
137137 public function addConditionOn (Control $ control , callable |string $ validator , mixed $ arg = null ): static
138138 {
@@ -230,11 +230,11 @@ public function getToggleStates(array $toggles = [], bool $success = true, ?bool
230230 if ($ rule ->branch ) {
231231 $ toggles = $ rule ->branch ->getToggleStates (
232232 $ toggles ,
233- $ success && static ::validateRule ($ rule ),
233+ $ success && Rules ::validateRule ($ rule ),
234234 $ rule ->validator === Form::Blank ? false : $ emptyOptional ,
235235 );
236236 } elseif (!$ emptyOptional || $ rule ->validator === Form::Filled) {
237- $ success = $ success && static ::validateRule ($ rule );
237+ $ success = $ success && Rules ::validateRule ($ rule );
238238 }
239239 }
240240
0 commit comments