Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
4 / 4 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| RegexPositiveIntegerSimple | |
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 | |
| 7 | declare(strict_types=1); |
| 8 | |
| 9 | namespace pvc\regex\numeric; |
| 10 | |
| 11 | use pvc\regex\Regex; |
| 12 | |
| 13 | /** |
| 14 | * Class RegexPositiveIntegerSimple |
| 15 | */ |
| 16 | class RegexPositiveIntegerSimple extends Regex |
| 17 | { |
| 18 | public function __construct() |
| 19 | { |
| 20 | $label = 'simple positive integers (no grouping separator, decimal point, plus/minus signs)'; |
| 21 | $pattern = '/^(0|[1-9][0-9]*)$/'; |
| 22 | $this->setPattern($pattern); |
| 23 | $this->setLabel($label); |
| 24 | } |
| 25 | } |