Completed
Pull Request — develop (#1440)
by Zack
07:29
created
includes/admin/field-types/type_number.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -18,10 +18,10 @@
 block discarded – undo
18 18
 
19 19
 		$show_mt = $this->show_merge_tags();
20 20
 
21
-        if( $show_mt && $this->field['merge_tags'] !== false || $this->field['merge_tags'] === 'force' ) {
22
-            $class = 'merge-tag-support mt-position-right mt-hide_all_fields ';
23
-        }
24
-        $class .= !empty( $this->field['class'] ) ? $this->field['class'] : 'widefat';
21
+		if( $show_mt && $this->field['merge_tags'] !== false || $this->field['merge_tags'] === 'force' ) {
22
+			$class = 'merge-tag-support mt-position-right mt-hide_all_fields ';
23
+		}
24
+		$class .= !empty( $this->field['class'] ) ? $this->field['class'] : 'widefat';
25 25
 
26 26
 		$max  = \GV\Utils::get( $this->field, 'max', null );
27 27
 		$min  = \GV\Utils::get( $this->field, 'min', null );
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -3,13 +3,13 @@  discard block
 block discarded – undo
3 3
  * number input type
4 4
  */
5 5
 
6
-if( !class_exists('GravityView_FieldType_text') ) {
6
+if ( ! class_exists( 'GravityView_FieldType_text' ) ) {
7 7
 	include_once( GRAVITYVIEW_DIR . 'includes/admin/field-types/type_text.php' );
8 8
 }
9 9
 class GravityView_FieldType_number extends GravityView_FieldType_text {
10 10
 
11 11
 	function render_input( $override_input = null ) {
12
-		if( isset( $override_input ) ) {
12
+		if ( isset( $override_input ) ) {
13 13
 			echo $override_input;
14 14
 			return;
15 15
 		}
@@ -18,18 +18,18 @@  discard block
 block discarded – undo
18 18
 
19 19
 		$show_mt = $this->show_merge_tags();
20 20
 
21
-        if( $show_mt && $this->field['merge_tags'] !== false || $this->field['merge_tags'] === 'force' ) {
21
+        if ( $show_mt && $this->field[ 'merge_tags' ] !== false || $this->field[ 'merge_tags' ] === 'force' ) {
22 22
             $class = 'merge-tag-support mt-position-right mt-hide_all_fields ';
23 23
         }
24
-        $class .= !empty( $this->field['class'] ) ? $this->field['class'] : 'widefat';
24
+        $class .= ! empty( $this->field[ 'class' ] ) ? $this->field[ 'class' ] : 'widefat';
25 25
 
26 26
 		$max  = \GV\Utils::get( $this->field, 'max', null );
27 27
 		$min  = \GV\Utils::get( $this->field, 'min', null );
28 28
 		$step = \GV\Utils::get( $this->field, 'step', null );
29 29
 
30
-		$atts .= $max ? ' max="' . (int) $max . '"' : '';
31
-		$atts .= $min ? ' min="' . (int) $min . '"' : '';
32
-		$atts .= $step ? ' step="' . (int) $step . '"' : '';
30
+		$atts .= $max ? ' max="' . (int)$max . '"' : '';
31
+		$atts .= $min ? ' min="' . (int)$min . '"' : '';
32
+		$atts .= $step ? ' step="' . (int)$step . '"' : '';
33 33
 		?>
34 34
 		<input name="<?php echo esc_attr( $this->name ); ?>" id="<?php echo $this->get_field_id(); ?>" type="number"
35 35
 		       value="<?php echo esc_attr( $this->value ); ?>"
Please login to merge, or discard this patch.
includes/fields/class-gravityview-field-gravatar.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 	 */
75 75
 	static public function get_gravatar( $email, $size = 80, $default = 'mp', $rating = 'g', $img = true, $atts = array() ) {
76 76
 
77
-		$size = (int) $size;
77
+		$size = (int)$size;
78 78
 
79 79
 		if ( $size > 2048 ) {
80 80
 			$size = 2048;
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 	static public function get_email( $field_settings, $entry ) {
112 112
 
113 113
 		// There was no logged in user.
114
-		switch ( $field_settings['email_field'] ) {
114
+		switch ( $field_settings[ 'email_field' ] ) {
115 115
 			case 'created_by_email':
116 116
 
117 117
 				$created_by = \GV\Utils::get( $entry, 'created_by', null );
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 			return $field_options;
143 143
 		}
144 144
 
145
-		$field_options['email_field'] = array(
145
+		$field_options[ 'email_field' ] = array(
146 146
 			'type'    => 'select',
147 147
 			'label'   => __( 'Email to Use', 'gravityview' ),
148 148
 			'value'   => 'created_by_email',
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 			'choices' => $this->_get_email_field_choices( $form_id ),
151 151
 		);
152 152
 
153
-		$field_options['default'] = array(
153
+		$field_options[ 'default' ] = array(
154 154
 			'type'    => 'select',
155 155
 			'label'   => __( 'Default Image', 'gravityview' ),
156 156
 			'desc'    => __( 'Choose the default image to be shown when an email has no Gravatar.', 'gravityview' ) . ' <a href="https://en.gravatar.com/site/implement/images/">' . esc_html( sprintf( __( 'Read more about %s', 'gravityview' ), __( 'Default Image', 'gravityview' ) ) ) . '</a>',
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
 			),
167 167
 		);
168 168
 
169
-		$field_options['size'] = array(
169
+		$field_options[ 'size' ] = array(
170 170
 			'type'  => 'number',
171 171
 			'label' => __( 'Size in Pixels', 'gravityview' ),
172 172
 			'value' => 80,
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
 			'min'   => 1,
175 175
 		);
176 176
 
177
-		$field_options['rating'] = array(
177
+		$field_options[ 'rating' ] = array(
178 178
 			'type'    => 'radio',
179 179
 			'label'   => __( 'Maximum Rating', 'gravityview' ),
180 180
 			'desc'    => __( 'Gravatar allows users to self-rate their images so that they can indicate if an image is appropriate for a certain audience. Specify one of the following ratings to request images up to and including that rating.', 'gravityview' ) . ' <a href="https://en.gravatar.com/site/implement/images/#rating">' . esc_html( sprintf( __( 'Read more about %s', 'gravityview' ), __( 'Ratings', 'gravityview' ) ) ) . '</a>',
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
 		$email_fields = GFAPI::get_fields_by_type( $form, array( 'email' ) );
213 213
 
214 214
 		foreach ( $email_fields as $email_field ) {
215
-			$email_field_id                   = $email_field['id'];
215
+			$email_field_id                   = $email_field[ 'id' ];
216 216
 			$email_field_label                = GVCommon::get_field_label( $form, $email_field_id );
217 217
 			$email_field_label                = sprintf( __( 'Field: %s', 'gravityview' ), $email_field_label );
218 218
 			$field_choices[ $email_field_id ] = esc_html( $email_field_label );
Please login to merge, or discard this patch.