Completed
Pull Request — master (#1383)
by
unknown
01:50
created

WC_Subscription   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 16
rs 10
c 0
b 0
f 0
wmc 2
lcom 1
cbo 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A get_related_orders() 0 3 1
A set_related_orders() 0 3 1
1
<?php
2
/**
3
 * Subscription helpers.
4
 *
5
 * @package WooCommerce\Payments\Tests
6
 */
7
8
/**
9
 * Class WC_Subscription.
10
 *
11
 * This helper class should ONLY be used for unit tests!.
12
 */
13
class WC_Subscription {
14
	/**
15
	 * Helper variable for mocking get_related_orders.
16
	 *
17
	 * @var array
18
	 */
19
	public $related_orders;
20
21
	public function get_related_orders( $type ) {
0 ignored issues
show
Unused Code introduced by
The parameter $type is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
22
		return $this->related_orders;
23
	}
24
25
	public function set_related_orders( $array ) {
26
		$this->related_orders = $array;
27
	}
28
}
29