Conditions | 1 |
Paths | 1 |
Total Lines | 61 |
Code Lines | 47 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.
For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.
Commonly applied refactorings include:
If many parameters/temporary variables are present:
1 | <?php |
||
89 | public static function get_form_action_tip() { |
||
90 | $tips = array( |
||
91 | array( |
||
92 | 'link' => 'https://formidablepro.com/email-routing-tip', |
||
93 | 'tip' => __( 'Save time by sending the email to the right person automatically.', 'formidable' ), |
||
94 | 'call' => __( 'Add email routing.', 'formidable' ), |
||
95 | ), |
||
96 | array( |
||
97 | 'link' => 'https://formidablepro.com/create-posts-tip', |
||
98 | 'tip' => __( 'Create blog posts or pages from the front-end.', 'formidable' ), |
||
99 | 'call' => __( 'Upgrade to Pro.', 'formidable' ), |
||
100 | ), |
||
101 | array( |
||
102 | 'link' => 'https://formidablepro.com/front-end-posting-tip', |
||
103 | 'tip' => __( 'Make front-end posting easy.', 'formidable' ), |
||
104 | 'call' => __( 'Upgrade to Pro.', 'formidable' ), |
||
105 | ), |
||
106 | array( |
||
107 | 'link' => 'https://formidablepro.com/mailchimp-tip', |
||
108 | 'tip' => __( 'Grow your business with automated email follow-up.', 'formidable' ), |
||
109 | 'call' => __( 'Send leads straight to MailChimp.', 'formidable' ), |
||
110 | ), |
||
111 | array( |
||
112 | 'link' => 'https://formidablepro.com/paypal-tip', |
||
113 | 'tip' => __( 'Save hours and increase revenue by collecting payments with every submission.', 'formidable' ), |
||
114 | 'call' => __( 'Use PayPal with this form.', 'formidable' ), |
||
115 | ), |
||
116 | array( |
||
117 | 'link' => 'https://formidablepro.com/paypal-increase-revenue-tip', |
||
118 | 'tip' => __( 'Increase revenue.', 'formidable' ), |
||
119 | 'call' => __( 'Use PayPal with this form.', 'formidable' ), |
||
120 | ), |
||
121 | array( |
||
122 | 'link' => 'https://formidablepro.com/paypal-save-time-tip', |
||
123 | 'tip' => __( 'Get paid more quickly.', 'formidable' ), |
||
124 | 'call' => __( 'Use Paypal with this form.', 'formidable' ), |
||
125 | ), |
||
126 | array( |
||
127 | 'link' => 'https://formidablepro.com/registration-tip', |
||
128 | 'tip' => __( 'Boost your site membership.', 'formidable' ), |
||
129 | 'call' => __( 'Automatically create user accounts.', 'formidable' ), |
||
130 | ), |
||
131 | array( |
||
132 | 'link' => 'https://formidablepro.com/registration-profile-editing-tip', |
||
133 | 'tip' => __( 'Make front-end profile editing possible.', 'formidable' ), |
||
134 | 'call' => __( 'Add user registration.', 'formidable' ), |
||
135 | ), |
||
136 | array( |
||
137 | 'link' => 'https://formidablepro.com/twilio-tip', |
||
138 | 'tip' => __( 'Want a text when this form is submitted or when a payment is received?', 'formidable' ), |
||
139 | 'call' => __( 'Use Twilio with this form.', 'formidable' ), |
||
140 | ), |
||
141 | array( |
||
142 | 'link' => 'https://formidablepro.com/twilio-send-tip', |
||
143 | 'tip' => __( 'Send a text when this form is submitted.', 'formidable' ), |
||
144 | 'call' => __( 'Get Twilio.', 'formidable' ), |
||
145 | ), |
||
146 | ); |
||
147 | |||
148 | return $tips; |
||
149 | } |
||
150 | |||
219 |