Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
4 / 4 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
RegexYesNo | |
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 | * @author: Doug Wilbourne (dougwilbourne@gmail.com) |
4 | * @version 1.0 |
5 | */ |
6 | |
7 | namespace pvc\regex\boolean; |
8 | |
9 | use pvc\regex\Regex; |
10 | |
11 | /** |
12 | * Class RegexYesNo |
13 | */ |
14 | class RegexYesNo extends Regex |
15 | { |
16 | |
17 | public function __construct() |
18 | { |
19 | $pattern = '/^(yes|no)$/'; |
20 | $label = 'yes / no'; |
21 | $this->setPattern($pattern); |
22 | $this->setLabel($label); |
23 | } |
24 | } |