Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
TitleTester | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
testValue | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | |
3 | /** |
4 | * @author: Doug Wilbourne (dougwilbourne@gmail.com) |
5 | */ |
6 | declare(strict_types=1); |
7 | |
8 | namespace pvc\html\val_tester; |
9 | |
10 | use pvc\interfaces\validator\ValTesterInterface; |
11 | |
12 | /** |
13 | * Class TitleTester |
14 | * @implements ValTesterInterface<string> |
15 | */ |
16 | class TitleTester implements ValTesterInterface |
17 | { |
18 | const MAX_TITLE_LENGTH = 100; |
19 | |
20 | public function testValue(mixed $value): bool |
21 | { |
22 | return (self::MAX_TITLE_LENGTH >= strlen($value)); |
23 | } |
24 | } |