Skip to content

Commit 6bf88fd

Browse files
committed
Formatting: Fixed PHPCS issues.
1 parent a6145f9 commit 6bf88fd

5 files changed

+23
-24
lines changed

experimental/gpuid-custom-format-ABC12345.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php
1+
<?php // phpcs:ignore WordPress.Files.FileName.NotHyphenatedLowercase
22
/**
33
* We're no longer using the experimental folder for experimental snippets. 🚧
44
* You can now find the snippet here:

gp-entry-blocks/gpeb-make-administrative-fields-visible-on-edit.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@
77
*/
88
class GPEB_Editable_Admin_Fields {
99

10-
private static $instance;
10+
private static $instance;
1111

12-
public static function get_instance() {
12+
public static function get_instance() {
1313

14-
if ( ! self::$instance ) {
15-
self::$instance = new self;
16-
}
14+
if ( ! self::$instance ) {
15+
self::$instance = new self;
16+
}
1717

18-
return self::$instance;
19-
}
18+
return self::$instance;
19+
}
2020

2121
private function __construct() {
2222

@@ -41,7 +41,7 @@ public function set_field_visbility_on_edit( $form ) {
4141
}
4242

4343
public function add_gpep_context_for_gpnf_ajax_requests( $args ) {
44-
$payload = array();
44+
$payload = array();
4545
$block_uuid = $this->get_edit_block_uuid( $args['formId'] );
4646
if ( $block_uuid ) {
4747
$payload['uuid'] = $block_uuid;
@@ -63,7 +63,7 @@ public function is_edit_entry_context( $form_id ) {
6363
return false;
6464
}
6565

66-
$action = rgpost( 'action' );
66+
$action = rgpost( 'action' );
6767
if ( ! in_array( $action, array( 'gpnf_edit_entry', 'gpnf_refresh_markup' ) ) ) {
6868
return false;
6969
}
@@ -118,7 +118,7 @@ public function get_edit_block_nonce_action( $block_uuid, $entry_id ) {
118118
}
119119

120120
function gpeb_editable_admin_fields() {
121-
return GPEB_Editable_Admin_Fields::get_instance();
121+
return GPEB_Editable_Admin_Fields::get_instance();
122122
}
123123

124124
gpeb_editable_admin_fields();

gp-unique-id/gpuid-fill-sequence-gaps.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@
1414

1515
$table_name = GFFormsModel::get_entry_meta_table_name();
1616

17-
$result = $wpdb->get_results( $wpdb->prepare( "
18-
select meta_value
19-
from {$table_name}
17+
// phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
18+
$result = $wpdb->get_results( $wpdb->prepare( "select meta_value from {$table_name}
2019
where form_id = %d and meta_key = %d", $form_id, $field_id ) );
2120

2221
if ( empty( $result ) ) {

gravity-forms/gw-coupons-exclude-products.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ function output_script() {
6969

7070
if( window.gform ) {
7171

72-
gform.addFilter( 'gform_coupons_discount_amount', function( discount, couponType, couponAmount, price, totalDiscount, formId ) {
72+
gform.addFilter( 'gform_coupons_discount_amount', function( discount, couponType, couponAmount, price, totalDiscount, formId ) {
7373

7474
price -= getExcludedAmount( formId );
7575

@@ -190,14 +190,14 @@ function is_applicable_form( $form ) {
190190

191191
$coupon_fields = GFCommon::get_fields_by_type( $form, array( 'coupon' ) );
192192

193-
if( sizeof( $this->_args['exclude_fields_by_form']) > 0 ) {
193+
if ( sizeof( $this->_args['exclude_fields_by_form'] ) > 0 ) {
194194
$is_applicable_form_id = in_array( $form['id'], array_keys( $this->_args['exclude_fields_by_form'] ) );
195-
if( $is_applicable_form_id && $form['id'] != $this->_args['form_id'] ) {
196-
$this->_args['form_id'] = $form['id'];
197-
$this->_args['exclude_fields'] = $this->_args['exclude_fields_by_form'][$form['id']];
195+
if ( $is_applicable_form_id && $form['id'] != $this->_args['form_id'] ) {
196+
$this->_args['form_id'] = $form['id'];
197+
$this->_args['exclude_fields'] = $this->_args['exclude_fields_by_form'][ $form['id'] ];
198198
}
199199
}
200-
200+
201201
$is_applicable_form_id = $form['id'] == $this->_args['form_id'];
202202

203203
return $is_applicable_form_id && ! empty( $coupon_fields );
@@ -217,15 +217,15 @@ function is_applicable_form( $form ) {
217217
new GW_Coupons_Exclude_Products( array(
218218
'form_id' => 123,
219219
'exclude_fields' => array( 4, 5 ),
220-
'skip_for_100_percent' => false
220+
'skip_for_100_percent' => false,
221221
) );
222222

223223
// Multiple forms
224224

225225
new GW_Coupons_Exclude_Products( array(
226-
'exclude_fields_by_form' => array(
226+
'exclude_fields_by_form' => array(
227227
123 => array( 4, 5 ),
228228
456 => array( 7, 8 ),
229229
),
230-
'skip_for_100_percent' => false
230+
'skip_for_100_percent' => false,
231231
) );

gravity-forms/gw-gravity-forms-filter-out-zero-dollar-products.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
foreach ( $product_info['products'] as $field_id => $product ) {
1717
if ( GFCommon::to_number( $product['price'] ) != 0 ) {
1818
$products[ $field_id ] = $product;
19-
} else if ( isset( $product['options'] ) && is_array( $product['options'] ) ) {
19+
} elseif ( isset( $product['options'] ) && is_array( $product['options'] ) ) {
2020
foreach ( $product['options'] as $option ) {
2121
if ( GFCommon::to_number( $option['price'] ) !== 0 ) {
2222
$products[ $field_id ] = $product;

0 commit comments

Comments
 (0)