Skip to content

Commit 9b9fe7a

Browse files
authored
prof: use (string) intead of the strval func
1 parent 67ea544 commit 9b9fe7a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Traits/ScopedValidatorsTrait.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,9 @@ public static function isCheckFile(string $name): bool
668668
*/
669669
public static function isCheckRequired(string $name, array $args = []): bool
670670
{
671-
$name = $name === 'each' ? (strval($args[0] ?? '')) : $name;
671+
// the $arg.0 is validator name.
672+
$name = $name === 'each' ? ((string)($args[0] ?? '')) : $name;
673+
672674
return 0 === strpos($name, 'required');
673675
}
674676

0 commit comments

Comments
 (0)