Completed
Push — master ( 9cf7be...029c15 )
by Zack
04:07
created
includes/fields/class-gravityview-field-transaction-type.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 	public function get_content( $output, $entry, $field_settings, $field ) {
60 60
 
61 61
 		/** Overridden by a template. */
62
-		if( ! empty( $field['field_path'] ) ) { return $output; }
62
+		if ( ! empty( $field[ 'field_path' ] ) ) { return $output; }
63 63
 
64 64
 		return $this->get_string_from_value( $output );
65 65
 	}
@@ -78,11 +78,11 @@  discard block
 block discarded – undo
78 78
 		switch ( intval( $value ) ) {
79 79
 			case self::ONE_TIME_PAYMENT:
80 80
 			default:
81
-				$return = __('One-Time Payment', 'gravityview');
81
+				$return = __( 'One-Time Payment', 'gravityview' );
82 82
 				break;
83 83
 
84 84
 			case self::SUBSCRIPTION:
85
-				$return = __('Subscription', 'gravityview');
85
+				$return = __( 'Subscription', 'gravityview' );
86 86
 				break;
87 87
 		}
88 88
 
Please login to merge, or discard this patch.
includes/fields/class-gravityview-field-entry-link.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -30,25 +30,25 @@
 block discarded – undo
30 30
 
31 31
 	public function __construct() {
32 32
 		$this->label = esc_html__( 'Link to Entry', 'gravityview' );
33
-		$this->description = esc_html__('A dedicated link to the single entry with customizable text.', 'gravityview');
33
+		$this->description = esc_html__( 'A dedicated link to the single entry with customizable text.', 'gravityview' );
34 34
 		parent::__construct();
35 35
 	}
36 36
 
37 37
 	function field_options( $field_options, $template_id, $field_id, $context, $input_type ) {
38 38
 
39 39
 		// Always a link!
40
-		unset( $field_options['show_as_link'], $field_options['search_filter'] );
40
+		unset( $field_options[ 'show_as_link' ], $field_options[ 'search_filter' ] );
41 41
 
42
-		if( 'edit' === $context ) {
42
+		if ( 'edit' === $context ) {
43 43
 			return $field_options;
44 44
 		}
45 45
 
46 46
 		$add_options = array();
47
-		$add_options['entry_link_text'] = array(
47
+		$add_options[ 'entry_link_text' ] = array(
48 48
 			'type' => 'text',
49 49
 			'label' => __( 'Link Text:', 'gravityview' ),
50 50
 			'desc' => NULL,
51
-			'value' => __('View Details', 'gravityview'),
51
+			'value' => __( 'View Details', 'gravityview' ),
52 52
 			'merge_tags' => true,
53 53
 		);
54 54
 
Please login to merge, or discard this patch.
includes/fields/class-gravityview-field.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 
111 111
 		add_filter( 'gravityview/sortable/field_blacklist', array( $this, '_filter_sortable_fields' ), 1 );
112 112
 
113
-		if( $this->_custom_merge_tag ) {
113
+		if ( $this->_custom_merge_tag ) {
114 114
 			add_filter( 'gform_custom_merge_tags', array( $this, '_filter_gform_custom_merge_tags' ), 10, 4 );
115 115
 			add_filter( 'gform_replace_merge_tags', array( $this, '_filter_gform_replace_merge_tags' ), 10, 7 );
116 116
 		}
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 	 *
133 133
 	 * @return string Original text if {_custom_merge_tag} isn't found. Otherwise, replaced text.
134 134
 	 */
135
-	public function _filter_gform_replace_merge_tags( $text, $form = array(), $entry = array(), $url_encode = false, $esc_html = false  ) {
135
+	public function _filter_gform_replace_merge_tags( $text, $form = array(), $entry = array(), $url_encode = false, $esc_html = false ) {
136 136
 
137 137
 		/**
138 138
 		 * This prevents the gform_replace_merge_tags filter from being called twice, as defined in:
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 		 * @see GFCommon::replace_variables_prepopulate()
141 141
 		 * @todo Remove eventually: Gravity Forms fixed this issue in 1.9.14
142 142
 		 */
143
-		if( false === $form ) {
143
+		if ( false === $form ) {
144 144
 			return $text;
145 145
 		}
146 146
 
@@ -173,19 +173,19 @@  discard block
 block discarded – undo
173 173
 	 */
174 174
 	public function replace_merge_tag( $matches = array(), $text = '', $form = array(), $entry = array(), $url_encode = false, $esc_html = false ) {
175 175
 
176
-		foreach( $matches as $match ) {
176
+		foreach ( $matches as $match ) {
177 177
 
178
-			$full_tag = $match[0];
178
+			$full_tag = $match[ 0 ];
179 179
 
180 180
 			// Strip the Merge Tags
181
-			$tag = str_replace( array( '{', '}'), '', $full_tag );
181
+			$tag = str_replace( array( '{', '}' ), '', $full_tag );
182 182
 
183 183
 			// Replace the value from the entry, if exists
184
-			if( isset( $entry[ $tag ] ) ) {
184
+			if ( isset( $entry[ $tag ] ) ) {
185 185
 
186 186
 				$value = $entry[ $tag ];
187 187
 
188
-				if( is_callable( array( $this, 'get_content') ) ) {
188
+				if ( is_callable( array( $this, 'get_content' ) ) ) {
189 189
 					$value = $this->get_content( $value );
190 190
 				}
191 191
 
@@ -258,8 +258,8 @@  discard block
 block discarded – undo
258 258
 	 */
259 259
 	public function _filter_sortable_fields( $not_sortable ) {
260 260
 
261
-		if( ! $this->is_sortable ) {
262
-			$not_sortable[] = $this->name;
261
+		if ( ! $this->is_sortable ) {
262
+			$not_sortable[ ] = $this->name;
263 263
 		}
264 264
 
265 265
 		return $not_sortable;
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
 			'date_display' => array(
289 289
 				'type' => 'text',
290 290
 				'label' => __( 'Override Date Format', 'gravityview' ),
291
-				'desc' => sprintf( __( 'Define how the date is displayed (using %sthe PHP date format%s)', 'gravityview'), '<a href="https://codex.wordpress.org/Formatting_Date_and_Time">', '</a>' ),
291
+				'desc' => sprintf( __( 'Define how the date is displayed (using %sthe PHP date format%s)', 'gravityview' ), '<a href="https://codex.wordpress.org/Formatting_Date_and_Time">', '</a>' ),
292 292
 				/**
293 293
 				 * @filter `gravityview_date_format` Override the date format with a [PHP date format](https://codex.wordpress.org/Formatting_Date_and_Time)
294 294
 				 * @param[in,out] null|string $date_format Date Format (default: null)
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
 
314 314
 		$options = $this->field_support_options();
315 315
 
316
-		if( isset( $options[ $key ] ) ) {
316
+		if ( isset( $options[ $key ] ) ) {
317 317
 			$field_options[ $key ] = $options[ $key ];
318 318
 		}
319 319
 
Please login to merge, or discard this patch.
includes/fields/class-gravityview-field-payment-status.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 	 */
24 24
 	public function __construct() {
25 25
 		$this->label = esc_html__( 'Payment Status', 'gravityview' );
26
-		$this->description = esc_html__('The current payment status of the entry (ie "Processing", "Failed", "Cancelled", "Approved").', 'gravityview' );
26
+		$this->description = esc_html__( 'The current payment status of the entry (ie "Processing", "Failed", "Cancelled", "Approved").', 'gravityview' );
27 27
 		parent::__construct();
28 28
 	}
29 29
 }
Please login to merge, or discard this patch.
includes/fields/class-gravityview-field-post-category.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 
10 10
 	var $name = 'post_category';
11 11
 
12
-	var $search_operators = array( 'is', 'in', 'not in', 'isnot', 'contains');
12
+	var $search_operators = array( 'is', 'in', 'not in', 'isnot', 'contains' );
13 13
 
14 14
 	var $_gf_field_class_name = 'GF_Field_Post_Category';
15 15
 
@@ -22,12 +22,12 @@  discard block
 block discarded – undo
22 22
 
23 23
 	function field_options( $field_options, $template_id, $field_id, $context, $input_type ) {
24 24
 
25
-		if( 'edit' === $context ) {
25
+		if ( 'edit' === $context ) {
26 26
 			return $field_options;
27 27
 		}
28 28
 
29
-		$this->add_field_support('dynamic_data', $field_options );
30
-		$this->add_field_support('link_to_term', $field_options );
29
+		$this->add_field_support( 'dynamic_data', $field_options );
30
+		$this->add_field_support( 'link_to_term', $field_options );
31 31
 
32 32
 		return $field_options;
33 33
 	}
Please login to merge, or discard this patch.
includes/fields/class-gravityview-field-calculation.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,8 +37,8 @@
 block discarded – undo
37 37
 	public function blacklist_field_types( $field_types = array(), $context = '' ) {
38 38
 
39 39
 		// Allow Calculation field in Edit Entry
40
-		if( 'edit' !== $context ) {
41
-			$field_types[] = $this->name;
40
+		if ( 'edit' !== $context ) {
41
+			$field_types[ ] = $this->name;
42 42
 		}
43 43
 
44 44
 		return $field_types;
Please login to merge, or discard this patch.
includes/fields/class-gravityview-field-website.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -26,16 +26,16 @@  discard block
 block discarded – undo
26 26
 	function field_options( $field_options, $template_id = '', $field_id = '', $context = '', $input_type = '' ) {
27 27
 
28 28
 		// It makes no sense to use this as the link.
29
-		unset( $field_options['show_as_link'] );
29
+		unset( $field_options[ 'show_as_link' ] );
30 30
 
31
-		if( 'edit' === $context ) {
31
+		if ( 'edit' === $context ) {
32 32
 			return $field_options;
33 33
 		}
34 34
 
35 35
 		/**
36 36
 		 * @since 1.8
37 37
 		 */
38
-		$field_options['anchor_text'] = array(
38
+		$field_options[ 'anchor_text' ] = array(
39 39
 			'type' => 'text',
40 40
 			'label' => __( 'Link Text:', 'gravityview' ),
41 41
 			'desc' => __( 'Define custom link text. Leave blank to display the URL', 'gravityview' ),
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 			'merge_tags' => 'force',
44 44
 		);
45 45
 
46
-		$field_options['truncatelink'] = array(
46
+		$field_options[ 'truncatelink' ] = array(
47 47
 			'type' => 'checkbox',
48 48
 			'value' => true,
49 49
 			'label' => __( 'Shorten Link Display', 'gravityview' ),
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 			'desc' => __( 'Don&rsquo;t show the full URL, only show the domain.', 'gravityview' )
52 52
 		);
53 53
 
54
-		$field_options['open_same_window'] = array(
54
+		$field_options[ 'open_same_window' ] = array(
55 55
 			'type' => 'checkbox',
56 56
 			'value' => false,
57 57
 			'label' => __( 'Open link in the same window?', 'gravityview' ),
Please login to merge, or discard this patch.
includes/fields/class-gravityview-field-radio.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
 
10 10
 	var $name = 'radio';
11 11
 
12
-	var $search_operators = array( 'is', 'in', 'not in', 'isnot', 'contains');
12
+	var $search_operators = array( 'is', 'in', 'not in', 'isnot', 'contains' );
13 13
 
14 14
 	var $_gf_field_class_name = 'GF_Field_Radio';
15 15
 
Please login to merge, or discard this patch.
includes/fields/class-gravityview-field-gquiz_score.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 
19 19
 	function field_options( $field_options, $template_id, $field_id, $context, $input_type ) {
20 20
 
21
-		if( 'edit' === $context ) {
21
+		if ( 'edit' === $context ) {
22 22
 			return $field_options;
23 23
 		}
24 24
 
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 			'quiz_use_max_score' => array(
27 27
 				'type' => 'checkbox',
28 28
 				'label' => __( 'Show Max Score?', 'gravityview' ),
29
-				'desc' => __('Display score as the a fraction: "[score]/[max score]". If unchecked, will display score.', 'gravityview'),
29
+				'desc' => __( 'Display score as the a fraction: "[score]/[max score]". If unchecked, will display score.', 'gravityview' ),
30 30
 				'value' => true,
31 31
 				'merge_tags' => false,
32 32
 			),
Please login to merge, or discard this patch.