Completed
Push — master ( 027c33...8d74e7 )
by
unknown
03:32
created

Rule   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 34
c 0
b 0
f 0
ccs 8
cts 8
cp 1
rs 10
wmc 3
lcom 0
cbo 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getValidationMethod() 0 4 1
A getLangKey() 0 4 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: harry
5
 * Date: 2/15/18
6
 * Time: 5:05 PM
7
 */
8
9
namespace PluginSimpleValidate;
10
11
class Rule implements \PluginSimpleValidate\Contracts\Rule
12
{
13
    /**
14
     * @var string
15
     */
16
    private $validationMethod;
17
18
    /**
19
     * @var string
20
     */
21
    private $langKey;
22
23 3
    public function __construct(string $validationMethod, string $langKey)
24
    {
25 3
        $this->validationMethod = $validationMethod;
26 3
        $this->langKey = $langKey;
27 3
    }
28
29
    /**
30
     * @return string
31
     */
32 3
    public function getValidationMethod(): string
33
    {
34 3
        return $this->validationMethod;
35
    }
36
37
    /**
38
     * @return string
39
     */
40 3
    public function getLangKey(): string
41
    {
42 3
        return $this->langKey;
43
    }
44
}