1 | <?php |
||
5 | class StringVal |
||
6 | { |
||
7 | /** |
||
8 | * Validates that the value can be represented as a string. |
||
9 | * |
||
10 | * Essentially, this means any scalar value is valid (no arrays, objects, resources, etc). If the $subject is an |
||
11 | * object and has a __tostring() method, this will validate successfully. |
||
12 | * |
||
13 | * @param object $subject The subject to be filtered. |
||
14 | * @param string $field The subject field name. |
||
15 | * |
||
16 | * @return bool True if valid, false if not. |
||
17 | */ |
||
18 | 24 | public function __invoke($subject, string $field): bool |
|
28 | } |
||
29 |