| Conditions | 2 | 
| Paths | 2 | 
| Total Lines | 31 | 
| Code Lines | 21 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 0 | 
| CRAP Score | 6 | 
| Changes | 0 | ||
| 1 | <?php  | 
            ||
| 8 | 	public function __construct( $args = array() ) { | 
            ||
| 9 | $args = wp_parse_args(  | 
            ||
| 10 | $args,  | 
            ||
| 11 | array(  | 
            ||
| 12 | 'id' => null,  | 
            ||
| 13 | 'name' => null,  | 
            ||
| 14 | 'url' => 'https://secure.ogone.com/',  | 
            ||
| 15 | 'product_url' => __( 'https://payment-services.ingenico.com/nl/en', 'pronamic_ideal' ),  | 
            ||
| 16 | 'dashboard_url' => 'https://secure.ogone.com/',  | 
            ||
| 17 | 'provider' => 'ogone',  | 
            ||
| 18 | )  | 
            ||
| 19 | );  | 
            ||
| 20 | |||
| 21 | $this->id = $args['id'];  | 
            ||
| 22 | $this->name = $args['name'];  | 
            ||
| 23 | $this->url = $args['url'];  | 
            ||
| 24 | $this->product_url = $args['product_url'];  | 
            ||
| 25 | $this->dashboard_url = $args['dashboard_url'];  | 
            ||
| 26 | $this->provider = $args['provider'];  | 
            ||
| 27 | |||
| 28 | // Supports.  | 
            ||
| 29 | $this->supports = array(  | 
            ||
| 30 | 'webhook',  | 
            ||
| 31 | 'webhook_log',  | 
            ||
| 32 | );  | 
            ||
| 33 | |||
| 34 | // Actions.  | 
            ||
| 35 | $function = array( __NAMESPACE__ . '\Listener', 'listen' );  | 
            ||
| 36 | |||
| 37 | 		if ( ! has_action( 'wp_loaded', $function ) ) { | 
            ||
| 38 | add_action( 'wp_loaded', $function );  | 
            ||
| 39 | }  | 
            ||
| 42 |