BasicCheck   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 9
c 1
b 0
f 0
dl 0
loc 25
rs 10
wmc 4

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getCheckIdentifier() 0 3 1
A getIdentifier() 0 6 2
A setIdentifier() 0 3 1
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