Total Complexity | 3 |
Total Lines | 33 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
15 | class PaymentMethodsList { |
||
16 | /** |
||
17 | * List |
||
18 | * |
||
19 | * @var array |
||
20 | */ |
||
21 | private $list; |
||
22 | |||
23 | /** |
||
24 | * Constructs and initialize a payment methods list |
||
25 | */ |
||
26 | 3 | public function __construct( array $list = array() ) { |
|
27 | 3 | $this->list = $list; |
|
28 | 3 | } |
|
29 | |||
30 | /** |
||
31 | * Add payment method |
||
32 | * |
||
33 | * @param string $payment_method |
||
34 | */ |
||
35 | 1 | public function add_payment_method( $payment_method ) { |
|
36 | 1 | $this->list[] = $payment_method; |
|
37 | 1 | } |
|
38 | |||
39 | /** |
||
40 | * Create a string representation of this payment methods list |
||
41 | * |
||
42 | * List of selected payment methods and/or card brands to show on the payment page. Separated by a semi-colon. |
||
43 | * |
||
44 | * @return string |
||
45 | */ |
||
46 | 3 | public function __toString() { |
|
48 | } |
||
49 | } |
||
50 |