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
RegexAlphaNumericAndHorizontalWhitespace
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 */
7
8declare(strict_types = 1);
9
10namespace pvc\regex\text_ascii;
11
12use pvc\regex\Regex;
13
14/**
15 * Class RegexAlphaNumericAndHorizontalWhitespace
16 */
17class RegexAlphaNumericAndHorizontalWhitespace extends Regex
18{
19    public function __construct()
20    {
21        $label = 'alphanumeric or a horizontal whitespace character';
22        $pattern = '/^[a-zA-Z0-9\h]*$/';
23        $this->setPattern($pattern);
24        $this->setLabel($label);
25    }
26}