Passed
Push — master ( d48415...51cd43 )
by Dāvis
03:41
created

AbstractSpecification   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 36
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A isRequired() 0 3 1
A __construct() 0 4 1
A getMessage() 0 3 1
A getName() 0 3 1
1
<?php
2
3
namespace Sludio\HelperBundle\Openidconnect\Specification;
4
5
use Sludio\HelperBundle\Script\Specification\CompositeSpecification;
6
7
abstract class AbstractSpecification extends CompositeSpecification
8
{
9
    /**
10
     * @var string
11
     */
12
    protected $name;
13
14
    /**
15
     * @var string
16
     */
17
    protected $message;
18
19
    /**
20
     * @var bool
21
     */
22
    protected $required;
23
24
    public function __construct($name, $required = false)
25
    {
26
        $this->name = $name;
27
        $this->required = $required;
28
    }
29
30
    public function getName()
31
    {
32
        return $this->name;
33
    }
34
35
    public function getMessage()
36
    {
37
        return $this->message;
38
    }
39
40
    public function isRequired()
41
    {
42
        return $this->required;
43
    }
44
}
45