Passed
Push — master ( 590085...649359 )
by
unknown
37s
created

Rule::setValue()   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 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 4
ccs 0
cts 3
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: harry
5
 * Date: 2/26/18
6
 * Time: 4:54 PM
7
 */
8
9
namespace PluginSimpleValidate\WithValue;
10
11
use PluginSimpleValidate\Contracts\RuleWithValue;
12
13
class Rule extends \PluginSimpleValidate\Rule implements RuleWithValue
14
{
15
    /**
16
     * @var mixed
17
     */
18
    private $value;
19
20
    /**
21
     * Rule constructor.
22
     * @param string $validationMethod
23
     * @param string $langKey
24
     * @param array $value
25
     * @param array $args
26
     */
27 3
    public function __construct($validationMethod, $langKey, $value, array $args = [])
28
    {
29 3
        $this->value = $value;
30 3
        parent::__construct($validationMethod, $langKey, $args);
31 3
    }
32
33
    /**
34
     * @return mixed
35
     */
36 3
    public function getValue()
37
    {
38 3
        return $this->value;
39
    }
40
41
    /**
42
     * @param mixed $value
43
     */
44
    public function setValue($value)
45
    {
46
        $this->value = $value;
47
    }
48
}