Completed
Push — master ( 0365a3...8a81d1 )
by Alexey
02:12
created

ValidationResult::data()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 2
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
3
4
namespace Lexuss1979\Validol;
5
6
7
class ValidationResult
8
{
9
    private $result;
10
    private $validated;
11
    private $errors;
12
13 1
    public function __construct($result, $validated, $errors)
14
    {
15 1
        $this->result = $result;
16 1
        $this->validated = $validated;
17 1
        $this->errors = $errors;
18 1
    }
19
20 1
    public function success(){
21 1
        return $this->result;
22
    }
23
24 1
    public function fails(){
25 1
        return ! $this->success();
26
    }
27
28 1
    public function data(){
29 1
        return $this->validated;
30
    }
31
32 1
    public function errors(){
33 1
        return $this->errors;
34
    }
35
36
}