Validator::isValid()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 0
loc 5
rs 9.4286
ccs 3
cts 3
cp 1
cc 1
eloc 3
nc 1
nop 0
crap 1
1
<?php
2
3
namespace OpenTribes\Core\Validator;
4
5
use OpenTribes\Core\Traits\ErrorTrait;
6
7
/**
8
 * Description of Validator
9
 *
10
 * @author BlackScorp<[email protected]>
11
 */
12
abstract class Validator
13
{
14
    use ErrorTrait;
15
16
17 44
    public function isValid()
18
    {
19 44
        $this->validate();
20 44
        return false === $this->hasErrors();
21
    }
22
23
    abstract protected function validate();
24
}
25