Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
4 / 4 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
RegexAlphaNumeric | |
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 | * @package: pvc |
5 | * @author: Doug Wilbourne (dougwilbourne@gmail.com) |
6 | */ |
7 | |
8 | declare(strict_types=1); |
9 | |
10 | namespace pvc\regex\text_ascii; |
11 | |
12 | use pvc\regex\Regex; |
13 | |
14 | /** |
15 | * Class RegexTextAlphaNumeric |
16 | */ |
17 | class RegexAlphaNumeric extends Regex |
18 | { |
19 | public function __construct() |
20 | { |
21 | $label = 'alphanumeric text (only letters and numbers)'; |
22 | /** |
23 | * having trouble with POSIX notation on my system - gives a compile error.... |
24 | * $patternWithDelimiters = '/^[:alnum:]*$/'; |
25 | */ |
26 | $pattern = '/^[a-zA-Z0-9]*$/'; |
27 | $this->setPattern($pattern); |
28 | $this->setLabel($label); |
29 | } |
30 | } |