Completed
Push — master ( f0d030...55df2a )
by Stephanie
02:42
created

FrmDefApiAction   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 6
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
1
<?php
2
// add post action
3 View Code Duplication
class FrmDefPostAction extends FrmFormAction {
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
4
	public function __construct() {
5
		$action_ops = FrmFormAction::default_action_opts();
6
	    $action_ops['classes'] = 'ab-icon frm_dashicon_font dashicons-before frm_show_upgrade';
7
8
		parent::__construct( 'wppost', __( 'Create Post', 'formidable' ), $action_ops );
9
	}
10
}
11
12
// add register action
13 View Code Duplication
class FrmDefRegAction extends FrmFormAction {
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
14
	public function __construct() {
15
		$action_ops = FrmFormAction::default_action_opts( 'frm_register_icon frm_show_upgrade' );
16
		$action_ops['plugin'] = 'registration';
17
		parent::__construct( 'register', __( 'Register User', 'formidable' ), $action_ops );
18
	}
19
}
20
21
// add paypal action
22 View Code Duplication
class FrmDefPayPalAction extends FrmFormAction {
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
23
	public function __construct() {
24
		$action_ops = FrmFormAction::default_action_opts( 'frm_paypal_icon frm_show_upgrade' );
25
		parent::__construct( 'paypal', __( 'PayPal Payment', 'formidable' ), $action_ops );
26
	}
27
}
28
29
// add aweber action
30 View Code Duplication
class FrmDefAweberAction extends FrmFormAction {
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
31
	public function __construct() {
32
		$action_ops = FrmFormAction::default_action_opts( 'frm_aweber_icon frm_show_upgrade' );
33
		parent::__construct( 'aweber', __( 'Aweber', 'formidable' ), $action_ops );
34
	}
35
}
36
37
// add mailchimp action
38 View Code Duplication
class FrmDefMlcmpAction extends FrmFormAction {
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
39
	public function __construct() {
40
		$action_ops = FrmFormAction::default_action_opts( 'frm_mailchimp_icon frm_show_upgrade' );
41
		parent::__construct( 'mailchimp', __( 'MailChimp', 'formidable' ), $action_ops );
42
	}
43
}
44
45
// add twilio action
46 View Code Duplication
class FrmDefTwilioAction extends FrmFormAction {
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
47
	public function __construct() {
48
		$action_ops = FrmFormAction::default_action_opts( 'frm_sms_icon frm_show_upgrade' );
49
		parent::__construct( 'twilio', __( 'Twilio SMS', 'formidable' ), $action_ops );
50
	}
51
}
52
53
// add payment action
54 View Code Duplication
class FrmDefHrsAction extends FrmFormAction {
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
55
	public function __construct() {
56
		$action_ops = FrmFormAction::default_action_opts( 'frm_stripe_icon frm_credit-card-alt_icon frm_show_upgrade' );
57
		$action_ops['plugin'] = 'stripe';
58
		parent::__construct( 'payment', __( 'Credit Card Payment', 'formidable' ), $action_ops );
59
	}
60
}
61
62
class FrmDefApiAction extends FrmFormAction {
63
	public function __construct() {
64
		$action_ops = FrmFormAction::default_action_opts( 'frm_feed_icon frm_show_upgrade' );
65
		parent::__construct( 'api', __( 'Send API data', 'formidable' ), $action_ops );
66
	}
67
}
68