Validator   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A isValid() 0 5 1
validate() 0 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