Passed
Push — master ( e9839e...f54444 )
by Sergey
02:47
created

NodeNameValidator   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 15
ccs 4
cts 4
cp 1
rs 10
c 2
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A validate() 0 8 2
1
<?php
2
/**
3
 * @author: Viskov Sergey
4
 * @date  : 4/12/16
5
 * @time  : 1:00 PM
6
 */
7
8
namespace LTDBeget\dns\configurator\validators;
9
10
/**
11
 * Class NodeNameValidator
12
 *
13
 * @package beget\lib\dns\lib\validators
14
 */
15
class NodeNameValidator
16
{
17
    /**
18
     * @param $value
19
     * @return bool
20
     */
21 1
    public static function validate($value)
22
    {
23 1
        if ($value === '*') {
24 1
            return true;
25
        }
26
27 1
        return DomainNameValidator::validate($value);
28
    }
29
}
30