Passed
Pull Request — master (#822)
by
unknown
09:10
created
templates/payment-forms/elements/pay_button.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -7,20 +7,20 @@  discard block
 block discarded – undo
7 7
  * @version 1.0.19
8 8
  */
9 9
 
10
-defined( 'ABSPATH' ) || exit;
10
+defined('ABSPATH') || exit;
11 11
 
12
-$class = empty( $class ) ? 'btn-primary' : sanitize_html_class( $class );
13
-$label = empty( $label ) ? esc_attr__( 'Pay %price% »', 'invoicing' ) : esc_attr( $label );
14
-$free  = empty( $free ) ? esc_attr__( 'Continue »', 'invoicing' ) : esc_attr( $free );
12
+$class = empty($class) ? 'btn-primary' : sanitize_html_class($class);
13
+$label = empty($label) ? esc_attr__('Pay %price% »', 'invoicing') : esc_attr($label);
14
+$free  = empty($free) ? esc_attr__('Continue »', 'invoicing') : esc_attr($free);
15 15
 
16
-do_action( 'getpaid_before_payment_form_pay_button', $form );
16
+do_action('getpaid_before_payment_form_pay_button', $form);
17 17
 
18 18
 aui()->input(
19 19
     array(
20
-        'name'             => esc_attr( $id ),
21
-        'id'               => esc_attr( $element_id ),
20
+        'name'             => esc_attr($id),
21
+        'id'               => esc_attr($element_id),
22 22
         'value'            => $label,
23
-        'help_text'        => empty( $description ) ? '' : wp_kses_post( $description ),
23
+        'help_text'        => empty($description) ? '' : wp_kses_post($description),
24 24
         'type'             => 'submit',
25 25
         'class'            => 'getpaid-payment-form-submit btn btn-block submit-button ' . $class,
26 26
         'extra_attributes' => array(
@@ -31,4 +31,4 @@  discard block
 block discarded – undo
31 31
     true
32 32
 );
33 33
 
34
-do_action( 'getpaid_after_payment_form_pay_button', $form );
34
+do_action('getpaid_after_payment_form_pay_button', $form);
Please login to merge, or discard this patch.
templates/payment-forms/elements/checkbox.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -7,24 +7,24 @@
 block discarded – undo
7 7
  * @version 1.0.19
8 8
  */
9 9
 
10
-defined( 'ABSPATH' ) || exit;
10
+defined('ABSPATH') || exit;
11 11
 
12
-$label       = empty( $label ) ? '' : wp_kses_post( $label );
13
-$label_class = sanitize_key( preg_replace( '/[^A-Za-z0-9_-]/', '-', $label ) );
12
+$label       = empty($label) ? '' : wp_kses_post($label);
13
+$label_class = sanitize_key(preg_replace('/[^A-Za-z0-9_-]/', '-', $label));
14 14
 
15
-if ( ! empty( $required ) ) {
15
+if (!empty($required)) {
16 16
     $label .= "<span class='text-danger'> *</span>";
17 17
 }
18 18
 
19 19
 aui()->input(
20 20
     array(
21 21
         'type'      => 'checkbox',
22
-        'name'      => esc_attr( $id ),
23
-        'id'        => esc_attr( $element_id ),
24
-        'required'  => ! empty( $required ),
22
+        'name'      => esc_attr($id),
23
+        'id'        => esc_attr($element_id),
24
+        'required'  => !empty($required),
25 25
         'label'     => $label,
26
-        'value'     => esc_attr__( 'Yes', 'invoicing' ),
27
-        'help_text' => empty( $description ) ? '' : wp_kses_post( $description ),
26
+        'value'     => esc_attr__('Yes', 'invoicing'),
27
+        'help_text' => empty($description) ? '' : wp_kses_post($description),
28 28
         'class'     => 'w-auto ' . $label_class,
29 29
     ),
30 30
     true
Please login to merge, or discard this patch.
includes/admin/meta-boxes/class-getpaid-meta-box-description.php 2 patches
Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -13,25 +13,25 @@
 block discarded – undo
13 13
  */
14 14
 class GetPaid_Meta_Box_Description {
15 15
 
16
-	/**
17
-	 * Output the metabox.
18
-	 *
19
-	 * @param WP_Post $post Post object.
20
-	 */
21
-	public static function output( $post ) {
16
+    /**
17
+     * Output the metabox.
18
+     *
19
+     * @param WP_Post $post Post object.
20
+     */
21
+    public static function output( $post ) {
22 22
 
23
-		$settings = array(
24
-			'textarea_name' => 'excerpt',
25
-			'quicktags'     => array( 'buttons' => 'em,strong,link' ),
26
-			'teeny'         => true,
27
-			'media_buttons' => false,
28
-			'tinymce'       => array(
29
-				'theme_advanced_buttons1' => 'bold,italic,strikethrough,separator,justifyleft,justifycenter,justifyright,separator,link,unlink,separator,undo,redo,separator',
30
-				'theme_advanced_buttons2' => '',
31
-			),
32
-			'editor_css'    => '<style>#wp-excerpt-editor-container .wp-editor-area{height:175px; width:100%;}</style>',
33
-		);
23
+        $settings = array(
24
+            'textarea_name' => 'excerpt',
25
+            'quicktags'     => array( 'buttons' => 'em,strong,link' ),
26
+            'teeny'         => true,
27
+            'media_buttons' => false,
28
+            'tinymce'       => array(
29
+                'theme_advanced_buttons1' => 'bold,italic,strikethrough,separator,justifyleft,justifycenter,justifyright,separator,link,unlink,separator,undo,redo,separator',
30
+                'theme_advanced_buttons2' => '',
31
+            ),
32
+            'editor_css'    => '<style>#wp-excerpt-editor-container .wp-editor-area{height:175px; width:100%;}</style>',
33
+        );
34 34
 
35
-		wp_editor( htmlspecialchars_decode( $post->post_excerpt, ENT_QUOTES ), 'excerpt', apply_filters( 'getpaid_description_editor_settings', $settings ) );
36
-	}
35
+        wp_editor( htmlspecialchars_decode( $post->post_excerpt, ENT_QUOTES ), 'excerpt', apply_filters( 'getpaid_description_editor_settings', $settings ) );
36
+    }
37 37
 }
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
  *
7 7
  */
8 8
 
9
-defined( 'ABSPATH' ) || exit;
9
+defined('ABSPATH') || exit;
10 10
 
11 11
 /**
12 12
  * GetPaid_Meta_Box_Description Class.
@@ -18,11 +18,11 @@  discard block
 block discarded – undo
18 18
 	 *
19 19
 	 * @param WP_Post $post Post object.
20 20
 	 */
21
-	public static function output( $post ) {
21
+	public static function output($post) {
22 22
 
23 23
 		$settings = array(
24 24
 			'textarea_name' => 'excerpt',
25
-			'quicktags'     => array( 'buttons' => 'em,strong,link' ),
25
+			'quicktags'     => array('buttons' => 'em,strong,link'),
26 26
 			'teeny'         => true,
27 27
 			'media_buttons' => false,
28 28
 			'tinymce'       => array(
@@ -32,6 +32,6 @@  discard block
 block discarded – undo
32 32
 			'editor_css'    => '<style>#wp-excerpt-editor-container .wp-editor-area{height:175px; width:100%;}</style>',
33 33
 		);
34 34
 
35
-		wp_editor( htmlspecialchars_decode( $post->post_excerpt, ENT_QUOTES ), 'excerpt', apply_filters( 'getpaid_description_editor_settings', $settings ) );
35
+		wp_editor(htmlspecialchars_decode($post->post_excerpt, ENT_QUOTES), 'excerpt', apply_filters('getpaid_description_editor_settings', $settings));
36 36
 	}
37 37
 }
Please login to merge, or discard this patch.
templates/payment-forms/elements/time.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -7,24 +7,24 @@
 block discarded – undo
7 7
  * @version 1.0.19
8 8
  */
9 9
 
10
-defined( 'ABSPATH' ) || exit;
10
+defined('ABSPATH') || exit;
11 11
 
12
-$label = empty( $label ) ? '' : wp_kses_post( $label );
13
-$label_class = sanitize_key( preg_replace( '/[^A-Za-z0-9_-]/', '-', $label ) );
12
+$label = empty($label) ? '' : wp_kses_post($label);
13
+$label_class = sanitize_key(preg_replace('/[^A-Za-z0-9_-]/', '-', $label));
14 14
 
15
-if ( ! empty( $required ) ) {
15
+if (!empty($required)) {
16 16
     $label .= "<span class='text-danger'> *</span>";
17 17
 }
18 18
 
19 19
 aui()->input(
20 20
     array(
21
-        'name'        => esc_attr( $id ),
22
-        'id'          => esc_attr( $element_id ),
23
-        'placeholder' => empty( $placeholder ) ? '' : esc_attr( $placeholder ),
24
-        'required'    => ! empty( $required ),
21
+        'name'        => esc_attr($id),
22
+        'id'          => esc_attr($element_id),
23
+        'placeholder' => empty($placeholder) ? '' : esc_attr($placeholder),
24
+        'required'    => !empty($required),
25 25
         'label'       => $label,
26 26
         'label_type'  => 'vertical',
27
-        'help_text'   => empty( $description ) ? '' : wp_kses_post( $description ),
27
+        'help_text'   => empty($description) ? '' : wp_kses_post($description),
28 28
         'type'        => 'time',
29 29
         'class'       => $label_class,
30 30
         'value'       => $query_value,
Please login to merge, or discard this patch.
templates/payment-forms/elements/textarea.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -7,24 +7,24 @@
 block discarded – undo
7 7
  * @version 1.0.19
8 8
  */
9 9
 
10
-defined( 'ABSPATH' ) || exit;
10
+defined('ABSPATH') || exit;
11 11
 
12
-$label = empty( $label ) ? '' : wp_kses_post( $label );
13
-$label_class = sanitize_key( preg_replace( '/[^A-Za-z0-9_-]/', '-', $label ) );
12
+$label = empty($label) ? '' : wp_kses_post($label);
13
+$label_class = sanitize_key(preg_replace('/[^A-Za-z0-9_-]/', '-', $label));
14 14
 
15
-if ( ! empty( $required ) ) {
15
+if (!empty($required)) {
16 16
     $label .= "<span class='text-danger'> *</span>";
17 17
 }
18 18
 
19 19
 aui()->textarea(
20 20
     array(
21
-        'name'        => esc_attr( $id ),
22
-        'id'          => esc_attr( $element_id ),
23
-        'placeholder' => empty( $placeholder ) ? '' : esc_attr( $placeholder ),
24
-        'required'    => ! empty( $required ),
21
+        'name'        => esc_attr($id),
22
+        'id'          => esc_attr($element_id),
23
+        'placeholder' => empty($placeholder) ? '' : esc_attr($placeholder),
24
+        'required'    => !empty($required),
25 25
         'label'       => $label,
26 26
         'label_type'  => 'vertical',
27
-        'help_text'   => empty( $description ) ? '' : wp_kses_post( $description ),
27
+        'help_text'   => empty($description) ? '' : wp_kses_post($description),
28 28
         'class'       => $label_class,
29 29
         'value'       => $query_value,
30 30
     ),
Please login to merge, or discard this patch.
templates/payment-forms/elements/select.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -7,25 +7,25 @@
 block discarded – undo
7 7
  * @version 1.0.19
8 8
  */
9 9
 
10
-defined( 'ABSPATH' ) || exit;
10
+defined('ABSPATH') || exit;
11 11
 
12
-$label = empty( $label ) ? '' : wp_kses_post( $label );
13
-$label_class = sanitize_key( preg_replace( '/[^A-Za-z0-9_-]/', '-', $label ) );
12
+$label = empty($label) ? '' : wp_kses_post($label);
13
+$label_class = sanitize_key(preg_replace('/[^A-Za-z0-9_-]/', '-', $label));
14 14
 
15
-if ( ! empty( $required ) ) {
15
+if (!empty($required)) {
16 16
     $label .= "<span class='text-danger'> *</span>";
17 17
 }
18 18
 
19 19
 aui()->select(
20 20
     array(
21
-        'name'        => esc_attr( $id ),
22
-        'id'          => esc_attr( $element_id ),
23
-        'placeholder' => empty( $placeholder ) ? '' : esc_attr( $placeholder ),
24
-        'required'    => ! empty( $required ),
21
+        'name'        => esc_attr($id),
22
+        'id'          => esc_attr($element_id),
23
+        'placeholder' => empty($placeholder) ? '' : esc_attr($placeholder),
24
+        'required'    => !empty($required),
25 25
         'label'       => $label,
26 26
         'label_type'  => 'vertical',
27
-        'help_text'   => empty( $description ) ? '' : wp_kses_post( $description ),
28
-        'options'     => empty( $options ) ? array() : array_combine( $options, $options ),
27
+        'help_text'   => empty($description) ? '' : wp_kses_post($description),
28
+        'options'     => empty($options) ? array() : array_combine($options, $options),
29 29
         'class'       => $label_class,
30 30
         'value'       => $query_value,
31 31
     ),
Please login to merge, or discard this patch.
templates/payment-forms/elements/email.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -7,24 +7,24 @@
 block discarded – undo
7 7
  * @version 1.0.19
8 8
  */
9 9
 
10
-defined( 'ABSPATH' ) || exit;
10
+defined('ABSPATH') || exit;
11 11
 
12
-$label = empty( $label ) ? '' : wp_kses_post( $label );
13
-$label_class = sanitize_key( preg_replace( '/[^A-Za-z0-9_-]/', '-', $label ) );
12
+$label = empty($label) ? '' : wp_kses_post($label);
13
+$label_class = sanitize_key(preg_replace('/[^A-Za-z0-9_-]/', '-', $label));
14 14
 
15
-if ( ! empty( $required ) ) {
15
+if (!empty($required)) {
16 16
     $label .= "<span class='text-danger'> *</span>";
17 17
 }
18 18
 
19 19
 aui()->input(
20 20
     array(
21
-        'name'        => esc_attr( $id ),
22
-        'id'          => esc_attr( $element_id ),
23
-        'placeholder' => empty( $placeholder ) ? '' : esc_attr( $placeholder ),
24
-        'required'    => ! empty( $required ),
21
+        'name'        => esc_attr($id),
22
+        'id'          => esc_attr($element_id),
23
+        'placeholder' => empty($placeholder) ? '' : esc_attr($placeholder),
24
+        'required'    => !empty($required),
25 25
         'label'       => $label,
26 26
         'label_type'  => 'vertical',
27
-        'help_text'   => empty( $description ) ? '' : wp_kses_post( $description ),
27
+        'help_text'   => empty($description) ? '' : wp_kses_post($description),
28 28
         'type'        => 'email',
29 29
         'class'       => $label_class,
30 30
         'value'       => $query_value,
Please login to merge, or discard this patch.
templates/payment-forms/elements/price_input.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -7,32 +7,32 @@
 block discarded – undo
7 7
  * @version 1.0.19
8 8
  */
9 9
 
10
-defined( 'ABSPATH' ) || exit;
10
+defined('ABSPATH') || exit;
11 11
 
12 12
 // Set the currency position.
13 13
 $position = wpinv_currency_position();
14 14
 
15
-if ( $position == 'left_space' ) {
15
+if ($position == 'left_space') {
16 16
     $position = 'left';
17 17
 }
18 18
 
19
-if ( $position == 'right_space' ) {
19
+if ($position == 'right_space') {
20 20
     $position = 'right';
21 21
 }
22
-$label       = empty( $label ) ? '' : esc_html( $label );
23
-$label_class = sanitize_key( preg_replace( '/[^A-Za-z0-9_-]/', '-', $label ) );
22
+$label       = empty($label) ? '' : esc_html($label);
23
+$label_class = sanitize_key(preg_replace('/[^A-Za-z0-9_-]/', '-', $label));
24 24
 
25 25
 aui()->input(
26 26
     array(
27
-        'name'              => esc_attr( $id ),
28
-        'id'                => esc_attr( $element_id ),
29
-        'placeholder'       => empty( $placeholder ) ? wpinv_format_amount( 0 ) : wpinv_format_amount( $placeholder ),
30
-        'value'             => empty( $value ) ? wpinv_format_amount( $query_value ) : wpinv_format_amount( $value ),
31
-        'label'             => empty( $label ) ? '' : wp_kses_post( $label ),
27
+        'name'              => esc_attr($id),
28
+        'id'                => esc_attr($element_id),
29
+        'placeholder'       => empty($placeholder) ? wpinv_format_amount(0) : wpinv_format_amount($placeholder),
30
+        'value'             => empty($value) ? wpinv_format_amount($query_value) : wpinv_format_amount($value),
31
+        'label'             => empty($label) ? '' : wp_kses_post($label),
32 32
         'label_type'        => 'vertical',
33
-        'help_text'         => empty( $description ) ? '' : wp_kses_post( $description ),
34
-        'input_group_right' => $position == 'right' ? wpinv_currency_symbol( $form->get_currency() ) : '',
35
-        'input_group_left'  => $position == 'left' ? wpinv_currency_symbol( $form->get_currency() ) : '',
33
+        'help_text'         => empty($description) ? '' : wp_kses_post($description),
34
+        'input_group_right' => $position == 'right' ? wpinv_currency_symbol($form->get_currency()) : '',
35
+        'input_group_left'  => $position == 'left' ? wpinv_currency_symbol($form->get_currency()) : '',
36 36
         'class'             => 'getpaid-refresh-on-change ' . $label_class,
37 37
     ),
38 38
     true
Please login to merge, or discard this patch.
templates/payment-forms/elements/number.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -7,24 +7,24 @@
 block discarded – undo
7 7
  * @version 1.0.19
8 8
  */
9 9
 
10
-defined( 'ABSPATH' ) || exit;
10
+defined('ABSPATH') || exit;
11 11
 
12
-$label = empty( $label ) ? '' : wp_kses_post( $label );
13
-$label_class = sanitize_key( preg_replace( '/[^A-Za-z0-9_-]/', '-', $label ) );
12
+$label = empty($label) ? '' : wp_kses_post($label);
13
+$label_class = sanitize_key(preg_replace('/[^A-Za-z0-9_-]/', '-', $label));
14 14
 
15
-if ( ! empty( $required ) ) {
15
+if (!empty($required)) {
16 16
     $label .= "<span class='text-danger'> *</span>";
17 17
 }
18 18
 
19 19
 aui()->input(
20 20
     array(
21
-        'name'        => esc_attr( $id ),
22
-        'id'          => esc_attr( $element_id ),
23
-        'placeholder' => empty( $placeholder ) ? '' : esc_attr( $placeholder ),
24
-        'required'    => ! empty( $required ),
21
+        'name'        => esc_attr($id),
22
+        'id'          => esc_attr($element_id),
23
+        'placeholder' => empty($placeholder) ? '' : esc_attr($placeholder),
24
+        'required'    => !empty($required),
25 25
         'label'       => $label,
26 26
         'label_type'  => 'vertical',
27
-        'help_text'   => empty( $description ) ? '' : wp_kses_post( $description ),
27
+        'help_text'   => empty($description) ? '' : wp_kses_post($description),
28 28
         'type'        => 'number',
29 29
         'class'       => $label_class,
30 30
         'value'       => $query_value,
Please login to merge, or discard this patch.