Validator::validate()
last analyzed

Size

Total Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 1
ccs 0
cts 0
cp 0
nc 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