AbstractStaticRegexRule   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 9
c 0
b 0
f 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getPregFormat() 0 4 1
pregFormat() 0 1 ?
1
<?php
2
/**
3
 * @link https://github.com/phpviet/validation
4
 *
5
 * @copyright (c) PHP Viet
6
 * @license [MIT](https://opensource.org/licenses/MIT)
7
 */
8
9
namespace PHPViet\Validation\Rules;
10
11
use Respect\Validation\Rules\AbstractRegexRule;
12
13
/**
14
 * @author Vuong Minh <[email protected]>
15
 * @since 1.0.0
16
 */
17
abstract class AbstractStaticRegexRule extends AbstractRegexRule
18
{
19
    protected function getPregFormat(): string
20
    {
21
        return static::pregFormat();
22
    }
23
24
    abstract public static function pregFormat(): string;
25
}
26