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
RegexAlphabetic
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 * @package: pvc
5 * @author: Doug Wilbourne (dougwilbourne@gmail.com)
6 * @version: 1.0
7 */
8
9declare(strict_types = 1);
10
11namespace pvc\regex\text_ascii;
12
13use pvc\regex\Regex;
14
15/**
16 * Class RegexAlphabetic
17 */
18class RegexAlphabetic extends Regex
19{
20    public function __construct()
21    {
22        $label = 'alphabetic text (only letters)';
23        /**
24         * having trouble with POSIX notation on my system - gives a compile error....
25         * $pattern = '/^[:alpha:]*$/';
26         */
27        $pattern = '/^[a-zA-Z]*$/';
28        $this->setPattern($pattern);
29        $this->setLabel($label);
30    }
31}