@@ -28,8 +28,8 @@ class Rules
2828 /**
2929 * The value does not match another field in $data.
3030 *
31- * @param string|null $str
32- * @param array $data Other field/value pairs
31+ * @param string|null $str
32+ * @param array<array-key, mixed> $data Other field/value pairs
3333 */
3434 public function differs ($ str , string $ field , array $ data ): bool
3535 {
@@ -110,12 +110,14 @@ public function greater_than_equal_to($str, string $min): bool
110110 * Can ignore records by field/value to filter (currently
111111 * accept only one filter).
112112 *
113- * Example:
113+ * ```
114114 * is_not_unique[dbGroup.table.field,where_field,where_value]
115115 * is_not_unique[table.field,where_field,where_value]
116116 * is_not_unique[menu.id,active,1]
117+ * ```
117118 *
118- * @param string|null $str
119+ * @param string|null $str
120+ * @param array<array-key, mixed> $data
119121 */
120122 public function is_not_unique ($ str , string $ field , array $ data ): bool
121123 {
@@ -158,7 +160,8 @@ public function in_list($value, string $list): bool
158160 * is_unique[table.field,ignore_field,ignore_value]
159161 * is_unique[users.email,id,5]
160162 *
161- * @param string|null $str
163+ * @param string|null $str
164+ * @param array<array-key, mixed> $data
162165 */
163166 public function is_unique ($ str , string $ field , array $ data ): bool
164167 {
@@ -178,9 +181,9 @@ public function is_unique($str, string $field, array $data): bool
178181 /**
179182 * Prepares the database query for uniqueness checks.
180183 *
181- * @param mixed $value The value to check.
182- * @param string $field The field parameters.
183- * @param array<string , mixed> $data Additional data.
184+ * @param mixed $value The value to check.
185+ * @param string $field The field parameters.
186+ * @param array<array-key , mixed> $data Additional data.
184187 *
185188 * @return array{0: BaseBuilder, 1: string|null, 2: string|null}
186189 */
@@ -247,8 +250,8 @@ public function less_than_equal_to($str, string $max): bool
247250 /**
248251 * Matches the value of another field in $data.
249252 *
250- * @param string|null $str
251- * @param array $data Other field/value pairs
253+ * @param string|null $str
254+ * @param array<array-key, mixed> $data Other field/value pairs
252255 */
253256 public function matches ($ str , string $ field , array $ data ): bool
254257 {
@@ -343,9 +346,9 @@ public function required($str = null): bool
343346 *
344347 * required_with[password]
345348 *
346- * @param string|null $str
347- * @param string|null $fields List of fields that we should check if present
348- * @param array $data Complete list of fields from the form
349+ * @param string|null $str
350+ * @param string|null $fields List of fields that we should check if present
351+ * @param array<array-key, mixed> $data Complete list of fields from the form
349352 */
350353 public function required_with ($ str = null , ?string $ fields = null , array $ data = []): bool
351354 {
@@ -387,9 +390,10 @@ public function required_with($str = null, ?string $fields = null, array $data =
387390 *
388391 * required_without[id,email]
389392 *
390- * @param string|null $str
391- * @param string|null $otherFields The param fields of required_without[].
392- * @param string|null $field This rule param fields aren't present, this field is required.
393+ * @param string|null $str
394+ * @param string|null $otherFields The param fields of required_without[].
395+ * @param string|null $field This rule param fields aren't present, this field is required.
396+ * @param array<array-key, mixed> $data
393397 */
394398 public function required_without (
395399 $ str = null ,
@@ -454,10 +458,10 @@ public function required_without(
454458 /**
455459 * The field exists in $data.
456460 *
457- * @param mixed $value The field value.
458- * @param string|null $param The rule's parameter.
459- * @param array $data The data to be validated.
460- * @param string|null $field The field name.
461+ * @param mixed $value The field value.
462+ * @param string|null $param The rule's parameter.
463+ * @param array<array-key, mixed> $data The data to be validated.
464+ * @param string|null $field The field name.
461465 */
462466 public function field_exists (
463467 $ value = null ,
0 commit comments