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

NodeNameValidator::validate()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 2

Importance

Changes 2
Bugs 0 Features 0
Metric Value
dl 0
loc 8
ccs 4
cts 4
cp 1
rs 9.4285
c 2
b 0
f 0
cc 2
eloc 4
nc 2
nop 1
crap 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