Rule   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 66.67%

Importance

Changes 0
Metric Value
dl 0
loc 36
ccs 6
cts 9
cp 0.6667
rs 10
c 0
b 0
f 0
wmc 3
lcom 0
cbo 1

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getValue() 0 4 1
A setValue() 0 4 1
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 4
    public function __construct($validationMethod, $langKey, $value, array $args = [])
28
    {
29 4
        $this->value = $value;
30 4
        parent::__construct($validationMethod, $langKey, $args);
31 4
    }
32
33
    /**
34
     * @return mixed
35
     */
36 4
    public function getValue()
37
    {
38 4
        return $this->value;
39
    }
40
41
    /**
42
     * @param mixed $value
43
     */
44
    public function setValue($value)
45
    {
46
        $this->value = $value;
47
    }
48
}