PayementMethod::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

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