Completed
Push — master ( 188ba1...86d637 )
by Samuel
02:55
created

Validation::getResultKey()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 0
cts 2
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
3
namespace Kelemen\ApiNette\Validator;
4
5
class Validation
6
{
7
    private $type;
8
9
    private $key;
10
11
    private $rules;
12
13
    private $resultKey;
14
15 12
    public function __construct($type, $key, $rules, $resultKey = null)
16
    {
17 12
        $this->type = $type;
18 12
        $this->key = $key;
19 12
        $this->rules = $rules;
20 12
        $this->resultKey = $resultKey !== null ? $resultKey : $key;
21 12
    }
22
23 12
    public function getType()
24
    {
25 12
        return $this->type;
26
    }
27
28 12
    public function getKey()
29
    {
30 12
        return $this->key;
31
    }
32
33 12
    public function getRules()
34
    {
35 12
        return $this->rules;
36
    }
37
38
    public function getResultKey()
39
    {
40
        return $this->resultKey;
41
    }
42
}
43