Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
4 / 4 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| RegexPhpVariableName | |
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 | * @author: Doug Wilbourne (dougwilbourne@gmail.com) |
| 4 | * @version 1.0 |
| 5 | */ |
| 6 | |
| 7 | declare(strict_types=1); |
| 8 | |
| 9 | namespace pvc\regex\php_variable_name; |
| 10 | |
| 11 | use pvc\regex\Regex; |
| 12 | |
| 13 | class RegexPhpVariableName extends Regex |
| 14 | { |
| 15 | public function __construct() |
| 16 | { |
| 17 | $label = 'php variable or label name'; |
| 18 | $pattern = '/^[a-zA-Z_\x80-\xff][a-zA-Z0-9_\x80-\xff]*$/'; |
| 19 | $this->setPattern($pattern); |
| 20 | $this->setLabel($label); |
| 21 | } |
| 22 | } |