CreditCheckStatusDokladEnum   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 52
Duplicated Lines 100 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 5
lcom 1
cbo 1
dl 52
loc 52
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A isNotFound() 4 4 1
A isOk() 4 4 1
A isOkWithWarnings() 4 4 1
A isRisk() 4 4 1
A isNotVerified() 4 4 1

How to fix   Duplicated Code   

Duplicated Code

Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.

Common duplication problems, and corresponding solutions are:

1
<?php
2
3
namespace Fousky\Component\iDoklad\LOV;
4
5
/**
6
 * @author Lukáš Brzák <[email protected]>
7
 */
8 View Code Duplication
class CreditCheckStatusDokladEnum extends iDokladAbstractEnum
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
9
{
10
    const NOT_FOUND = 0;
11
12
    const OK = 1;
13
14
    const OK_WITH_WARNINGS = 2;
15
16
    const RISK = 3;
17
18
    const NOT_VERIFIED = 4;
19
20
    /**
21
     * @return bool
22
     */
23
    public function isNotFound(): bool
24
    {
25
        return self::NOT_FOUND === $this->value;
26
    }
27
28
    /**
29
     * @return bool
30
     */
31
    public function isOk(): bool
32
    {
33
        return self::OK === $this->value;
34
    }
35
36
    /**
37
     * @return bool
38
     */
39
    public function isOkWithWarnings(): bool
40
    {
41
        return self::OK_WITH_WARNINGS === $this->value;
42
    }
43
44
    /**
45
     * @return bool
46
     */
47
    public function isRisk(): bool
48
    {
49
        return self::RISK === $this->value;
50
    }
51
52
    /**
53
     * @return bool
54
     */
55
    public function isNotVerified(): bool
56
    {
57
        return self::NOT_VERIFIED === $this->value;
58
    }
59
}
60