PayementMethod   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 38
rs 10
c 0
b 0
f 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A bankAccount() 0 3 1
A cash() 0 3 1
A __construct() 0 3 1
A card() 0 3 1
1
<?php
2
3
4
namespace Dolibarr\Client\Domain\Proposal;
5
6
/**
7
 * @author Laurent De Coninck <[email protected]>
8
 */
9
class PayementMethod
10
{
11
12
    /**
13
     * @var int
14
     */
15
    private $methodId;
16
17
    /**
18
     * @param int $methodId
19
     */
20
    private function __construct($methodId)
21
    {
22
        $this->methodId = $methodId;
23
    }
24
25
    /**
26
     * @return PayementMethod
27
     */
28
    public static function card()
29
    {
30
        return new PayementMethod(6);
31
    }
32
33
    /**
34
     * @return PayementMethod
35
     */
36
    public static function cash()
37
    {
38
        return new PayementMethod(4);
39
    }
40
41
    /**
42
     * @return PayementMethod
43
     */
44
    public static function bankAccount()
45
    {
46
        return new PayementMethod(2);
47
    }
48
}
49