Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
4 / 4 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
RegexSizes | |
100.00% |
4 / 4 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
__construct | |
100.00% |
4 / 4 |
|
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\regex; |
9 | |
10 | use pvc\regex\Regex; |
11 | |
12 | /** |
13 | * Class RegexSizes |
14 | */ |
15 | class RegexSizes extends Regex |
16 | { |
17 | /** |
18 | * @throws \pvc\regex\err\RegexBadPatternException |
19 | */ |
20 | public function __construct() |
21 | { |
22 | $pattern = '/^\d+x\d+|any$/'; |
23 | $label = "height x width (in pixels) or 'any'"; |
24 | $this->setPattern($pattern); |
25 | $this->setLabel($label); |
26 | } |
27 | } |