| Conditions | 2 | 
| Paths | 2 | 
| Total Lines | 26 | 
| Code Lines | 9 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 1 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php  | 
            ||
| 44 | 	public function get_customers() { | 
            ||
| 45 | global $wpdb;  | 
            ||
| 46 | |||
| 47 | $where = '1 = 1';  | 
            ||
| 48 | |||
| 49 | 		if ( array_key_exists( 'user_id', $this->args ) ) { | 
            ||
| 50 | $where .= $wpdb->prepare( ' AND mollie_customer_user.user_id = %d', $this->args['user_id'] );  | 
            ||
| 51 | }  | 
            ||
| 52 | |||
| 53 | $query = "  | 
            ||
| 54 | SELECT  | 
            ||
| 55 | mollie_customer.mollie_id,  | 
            ||
| 56 | mollie_customer.test_mode,  | 
            ||
| 57 | mollie_customer.name,  | 
            ||
| 58 | mollie_customer.email  | 
            ||
| 59 | FROM  | 
            ||
| 60 | $wpdb->pronamic_pay_mollie_customer_users AS mollie_customer_user  | 
            ||
| 61 | INNER JOIN  | 
            ||
| 62 | $wpdb->pronamic_pay_mollie_customers AS mollie_customer  | 
            ||
| 63 | ON mollie_customer_user.customer_id = mollie_customer.id  | 
            ||
| 64 | WHERE  | 
            ||
| 65 | $where  | 
            ||
| 66 | ;  | 
            ||
| 67 | ";  | 
            ||
| 68 | |||
| 69 | return $wpdb->get_results( $query );  | 
            ||
| 70 | }  | 
            ||
| 72 |