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

AbstractSpecification::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
c 0
b 0
f 0
nc 1
nop 2
dl 0
loc 4
rs 10
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