Code Coverage
 
Classes and Traits
Functions and Methods
Lines
Total
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
8 / 8
NonNegativeIntegerRange
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
8 / 8
 __construct
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
8 / 8
<?php declare(strict_types = 1);
/**
 * @package: pvc
 * @author: Doug Wilbourne (dougwilbourne@gmail.com)
 * @version: 1.0
 */
namespace pvc\range\non_negative_integer;
use pvc\range\Range;
/**
 * Class NonNegativeIntegerRange
 */
class NonNegativeIntegerRange extends Range
{
    public function __construct()
    {
        $v = new ValidatorIntegerNonNegative();
        $this->setValidator($v);
        $p = new ParserInteger();
        $this->setParser($p);
        $rangeDescription = 'must be comma separated non-negative integers or subranges ';
        $rangeDescription .= '(e.g. n-m where n and m are non-negative integers)';
        $this->setPatternDescription($rangeDescription);
    }
}