Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
4 / 4
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
1 / 1
RegexPositiveIntegerSimple
100.00% covered (success)
100.00%
4 / 4
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
1 / 1
 __construct
100.00% covered (success)
100.00%
4 / 4
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3/**
4 * @author: Doug Wilbourne (dougwilbourne@gmail.com)
5 */
6
7declare(strict_types=1);
8
9namespace pvc\regex\numeric;
10
11use pvc\regex\Regex;
12
13/**
14 * Class RegexPositiveIntegerSimple
15 */
16class 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}