Skip to content

Commit

Permalink
prof: use (string) intead of the strval func
Browse files Browse the repository at this point in the history
  • Loading branch information
inhere authored Nov 18, 2021
1 parent 67ea544 commit 9b9fe7a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Traits/ScopedValidatorsTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,9 @@ public static function isCheckFile(string $name): bool
*/
public static function isCheckRequired(string $name, array $args = []): bool
{
$name = $name === 'each' ? (strval($args[0] ?? '')) : $name;
// the $arg.0 is validator name.
$name = $name === 'each' ? ((string)($args[0] ?? '')) : $name;

return 0 === strpos($name, 'required');
}

Expand Down

0 comments on commit 9b9fe7a

Please sign in to comment.