Passed
Push — master ( b886e0...d77012 )
by Nils
02:35
created

BasicCheck::getIdentifier()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 2
nc 2
nop 0
1
<?php
2
3
namespace Leankoala\HealthFoundation\Check;
4
5
abstract class BasicCheck implements Check
6
{
7
    protected $identifier;
8
9
    protected $customIdentfier;
10
11
    /**
12
     * @param mixed $customIdentifier
13
     */
14
    public function setIdentifier($customIdentfier)
15
    {
16
        $this->customIdentfier = $customIdentfier;
17
    }
18
19
    protected function getCheckIdentifier()
20
    {
21
        return $this->identifier;
22
    }
23
24
    final public function getIdentifier()
25
    {
26
        if ($this->customIdentfier) {
27
            return $this->customIdentfier;
28
        } else {
29
            return $this->getCheckIdentifier();
30
        }
31
    }
32
}
33