Completed
Push — master ( 368685...01b37f )
by Lars
03:44 queued 13s
created

Email::validate()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 8
c 0
b 0
f 0
ccs 4
cts 4
cp 1
rs 10
cc 2
nc 2
nop 1
crap 2
1
<?php
2
3
namespace voku\HtmlFormValidator\Rules;
4
5
class Email extends \Respect\Validation\Rules\AbstractRule
6
{
7 15
    public function validate($input): bool
8
    {
9 15
        if (!\is_string($input)) {
10 1
            return false;
11
        }
12
13 14
        return \voku\helper\EmailCheck::isValid($input);
14
    }
15
}
16