Completed
Push — develop ( 363c2e...076af9 )
by Zack
10:02 queued 06:20
created
includes/class-gravityview-admin-bar.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 		/** @var WP_Admin_Bar $wp_admin_bar */
39 39
 		global $wp_admin_bar;
40 40
 
41
-		if( is_admin() || ! GVCommon::has_cap( array( 'edit_gravityviews', 'gravityview_edit_entry', 'gravityforms_edit_forms' ) ) ) {
41
+		if ( is_admin() || ! GVCommon::has_cap( array( 'edit_gravityviews', 'gravityview_edit_entry', 'gravityforms_edit_forms' ) ) ) {
42 42
 			return;
43 43
 		}
44 44
 
@@ -110,9 +110,9 @@  discard block
 block discarded – undo
110 110
 				'parent' => 'gravityview',
111 111
 				'title' => __( 'Edit Entry', 'gravityview' ),
112 112
 				'meta' => array(
113
-					'title' => sprintf( __( 'Edit Entry %s', 'gravityview' ), GravityView_API::get_entry_slug( $entry['id'], $entry ) ),
113
+					'title' => sprintf( __( 'Edit Entry %s', 'gravityview' ), GravityView_API::get_entry_slug( $entry[ 'id' ], $entry ) ),
114 114
 				),
115
-				'href' => esc_url_raw( admin_url( sprintf( 'admin.php?page=gf_entries&screen_mode=edit&view=entry&id=%d&lid=%d', $entry['form_id'], $entry['id'] ) ) ),
115
+				'href' => esc_url_raw( admin_url( sprintf( 'admin.php?page=gf_entries&screen_mode=edit&view=entry&id=%d&lid=%d', $entry[ 'form_id' ], $entry[ 'id' ] ) ) ),
116 116
 			) );
117 117
 
118 118
 		}
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 		/** @var WP_Admin_Bar $wp_admin_bar */
129 129
 		global $wp_admin_bar;
130 130
 
131
-		if( GVCommon::has_cap( array( 'edit_gravityviews', 'edit_gravityview', 'gravityforms_edit_forms' ) ) ) {
131
+		if ( GVCommon::has_cap( array( 'edit_gravityviews', 'edit_gravityview', 'gravityforms_edit_forms' ) ) ) {
132 132
 
133 133
 			if ( defined( 'GRAVITYVIEW_FUTURE_CORE_LOADED' ) ) {
134 134
 				$views = gravityview()->views->all();
@@ -152,21 +152,21 @@  discard block
 block discarded – undo
152 152
 						$form_id = $view->form ? $view->form->ID : null;
153 153
 					} else {
154 154
 						/** Deprecated. */
155
-						$view_id = $view['id'];
156
-						$form_id = $view['form_id'];
155
+						$view_id = $view[ 'id' ];
156
+						$form_id = $view[ 'form_id' ];
157 157
 					}
158 158
 
159 159
 					$edit_view_title = __( 'Edit View', 'gravityview' );
160 160
 					$edit_form_title = __( 'Edit Form', 'gravityview' );
161 161
 
162
-					if( sizeof( $views ) > 1 ) {
162
+					if ( sizeof( $views ) > 1 ) {
163 163
 						$edit_view_title = sprintf( _x( 'Edit View #%d', 'Edit View with the ID of %d', 'gravityview' ), $view_id );
164 164
 						$edit_form_title = sprintf( __( 'Edit Form #%d', 'Edit Form with the ID of %d', 'gravityview' ), $form_id );
165 165
 					}
166 166
 
167
-					if( GVCommon::has_cap( 'edit_gravityview', $view_id ) && ! in_array( $view_id, $added_views ) ) {
167
+					if ( GVCommon::has_cap( 'edit_gravityview', $view_id ) && ! in_array( $view_id, $added_views ) ) {
168 168
 
169
-						$added_views[] = $view_id;
169
+						$added_views[ ] = $view_id;
170 170
 
171 171
 						$wp_admin_bar->add_menu( array(
172 172
 							'id'    => 'edit-view-' . $view_id,
@@ -176,9 +176,9 @@  discard block
 block discarded – undo
176 176
 						) );
177 177
 					}
178 178
 
179
-					if ( ! empty( $form_id ) && GVCommon::has_cap( array( 'gravityforms_edit_forms' ), $form_id ) && ! in_array( $form_id, $added_forms )  ) {
179
+					if ( ! empty( $form_id ) && GVCommon::has_cap( array( 'gravityforms_edit_forms' ), $form_id ) && ! in_array( $form_id, $added_forms ) ) {
180 180
 
181
-						$added_forms[] = $form_id;
181
+						$added_forms[ ] = $form_id;
182 182
 
183 183
 						$wp_admin_bar->add_menu( array(
184 184
 							'id'    => 'edit-form-' . $form_id,
Please login to merge, or discard this patch.
future/includes/class-gv-collection-view.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -129,12 +129,12 @@
 block discarded – undo
129 129
 
130 130
 		/** Let's find us some [gravityview] shortcodes perhaps. */
131 131
 		foreach ( Shortcode::parse( $content ) as $shortcode ) {
132
-			if ( $shortcode->name != 'gravityview' || empty( $shortcode->atts['id'] ) ) {
132
+			if ( $shortcode->name != 'gravityview' || empty( $shortcode->atts[ 'id' ] ) ) {
133 133
 				continue;
134 134
 			}
135 135
 
136
-			if ( is_numeric( $shortcode->atts['id'] ) ) {
137
-				$view = View::by_id( $shortcode->atts['id'] );
136
+			if ( is_numeric( $shortcode->atts[ 'id' ] ) ) {
137
+				$view = View::by_id( $shortcode->atts[ 'id' ] );
138 138
 				if ( ! $view ) {
139 139
 					continue;
140 140
 				}
Please login to merge, or discard this patch.
future/includes/class-gv-collection-entry.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -103,11 +103,11 @@  discard block
 block discarded – undo
103 103
 
104 104
 		/** Call all lazy callbacks. */
105 105
 		foreach ( $this->callbacks as $callback ) {
106
-			if ( $callback[0] != 'count' ) {
106
+			if ( $callback[ 0 ] != 'count' ) {
107 107
 				continue;
108 108
 			}
109 109
 
110
-			$total += $callback[1]( $this->filters );
110
+			$total += $callback[ 1 ]( $this->filters );
111 111
 		}
112 112
 
113 113
 		return $total - $this->offset;
@@ -161,11 +161,11 @@  discard block
 block discarded – undo
161 161
 
162 162
 		/** Call all lazy callbacks. */
163 163
 		foreach ( $this->callbacks as $i => $callback ) {
164
-			if ( $callback[0] != 'fetch' ) {
164
+			if ( $callback[ 0 ] != 'fetch' ) {
165 165
 				continue;
166 166
 			}
167 167
 
168
-			$this->merge( $callback[1]( $this->filters, $this->sorts, $offset ) );
168
+			$this->merge( $callback[ 1 ]( $this->filters, $this->sorts, $offset ) );
169 169
 		}
170 170
 
171 171
 		$this->fetched = $this->count();
@@ -321,7 +321,7 @@  discard block
 block discarded – undo
321 321
 			return;
322 322
 		}
323 323
 
324
-		$this->callbacks []= array( $type, $callback );
324
+		$this->callbacks [ ] = array( $type, $callback );
325 325
 	}
326 326
 
327 327
 	/**
Please login to merge, or discard this patch.
future/includes/class-gv-collection.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 	 * @return void
26 26
 	 */
27 27
 	public function add( $value ) {
28
-		$this->storage []= $value;
28
+		$this->storage [ ] = $value;
29 29
 	}
30 30
 
31 31
 	/**
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 	 * @return void
50 50
 	 */
51 51
 	public function merge( \GV\Collection $collection ) {
52
-		array_map( array( $this, 'add'), $collection->all() );
52
+		array_map( array( $this, 'add' ), $collection->all() );
53 53
 	}
54 54
 
55 55
 	/**
Please login to merge, or discard this patch.
future/includes/class-gv-plugin.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -205,8 +205,8 @@  discard block
 block discarded – undo
205 205
 	 * @return string The version of PHP.
206 206
 	 */
207 207
 	private function get_php_version() {
208
-		return !empty( $GLOBALS['GRAVITYVIEW_TESTS_PHP_VERSION_OVERRIDE'] ) ?
209
-			$GLOBALS['GRAVITYVIEW_TESTS_PHP_VERSION_OVERRIDE'] : phpversion();
208
+		return ! empty( $GLOBALS[ 'GRAVITYVIEW_TESTS_PHP_VERSION_OVERRIDE' ] ) ?
209
+			$GLOBALS[ 'GRAVITYVIEW_TESTS_PHP_VERSION_OVERRIDE' ] : phpversion();
210 210
 	}
211 211
 
212 212
 	/**
@@ -217,8 +217,8 @@  discard block
 block discarded – undo
217 217
 	 * @return string The version of WordPress.
218 218
 	 */
219 219
 	private function get_wordpress_version() {
220
-		return !empty( $GLOBALS['GRAVITYVIEW_TESTS_WP_VERSION_OVERRIDE'] ) ?
221
-			$GLOBALS['GRAVITYVIEW_TESTS_WP_VERSION_OVERRIDE'] : $GLOBALS['wp_version'];
220
+		return ! empty( $GLOBALS[ 'GRAVITYVIEW_TESTS_WP_VERSION_OVERRIDE' ] ) ?
221
+			$GLOBALS[ 'GRAVITYVIEW_TESTS_WP_VERSION_OVERRIDE' ] : $GLOBALS[ 'wp_version' ];
222 222
 	}
223 223
 
224 224
 	/**
@@ -230,12 +230,12 @@  discard block
 block discarded – undo
230 230
 	 * @return string The version of Gravity Forms.
231 231
 	 */
232 232
 	private function get_gravityforms_version() {
233
-		if ( !class_exists( '\GFCommon' ) || !empty( $GLOBALS['GRAVITYVIEW_TESTS_GF_INACTIVE_OVERRIDE'] ) ) {
233
+		if ( ! class_exists( '\GFCommon' ) || ! empty( $GLOBALS[ 'GRAVITYVIEW_TESTS_GF_INACTIVE_OVERRIDE' ] ) ) {
234 234
 			throw new \ErrorException( 'Gravity Forms is inactive or not installed.' );
235 235
 		}
236 236
 
237
-		return !empty( $GLOBALS['GRAVITYVIEW_TESTS_GF_VERSION_OVERRIDE'] ) ?
238
-			$GLOBALS['GRAVITYVIEW_TESTS_GF_VERSION_OVERRIDE'] : \GFCommon::$version;
237
+		return ! empty( $GLOBALS[ 'GRAVITYVIEW_TESTS_GF_VERSION_OVERRIDE' ] ) ?
238
+			$GLOBALS[ 'GRAVITYVIEW_TESTS_GF_VERSION_OVERRIDE' ] : \GFCommon::$version;
239 239
 	}
240 240
 
241 241
 	private function __clone() { }
Please login to merge, or discard this patch.
future/includes/class-gv-logger-wp-action.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 	protected function log( $level, $message, $context ) {
29 29
 
30 30
 		$backtrace = debug_backtrace();
31
-		$location = $this->interpolate( "{class}{type}{function}", $backtrace[2] );
31
+		$location = $this->interpolate( "{class}{type}{function}", $backtrace[ 2 ] );
32 32
 
33 33
 		$message = $this->interpolate( "[$level, $location] $message", $context );
34 34
 
@@ -52,14 +52,14 @@  discard block
 block discarded – undo
52 52
 			do_action(
53 53
 				sprintf( 'gravityview_log_%s_test', $action ),
54 54
 				$this->interpolate( $message, $context ),
55
-				empty( $context['data'] ) ? array() : $context['data']
55
+				empty( $context[ 'data' ] ) ? array() : $context[ 'data' ]
56 56
 			);
57 57
 		}
58 58
 		
59 59
 		do_action(
60 60
 			sprintf( 'gravityview_log_%s', $action ),
61 61
 			$this->interpolate( $message, $context ),
62
-			empty( $context['data'] ) ? array() : $context['data']
62
+			empty( $context[ 'data' ] ) ? array() : $context[ 'data' ]
63 63
 		);
64 64
 	}
65 65
 }
Please login to merge, or discard this patch.
future/includes/class-gv-logger.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -36,9 +36,9 @@  discard block
 block discarded – undo
36 36
      *
37 37
      * @return void
38 38
      */
39
-    public function emergency($message, array $context = array())
39
+    public function emergency( $message, array $context = array() )
40 40
     {
41
-        $this->log(LogLevel::EMERGENCY, $message, $context);
41
+        $this->log( LogLevel::EMERGENCY, $message, $context );
42 42
     }
43 43
 
44 44
     /**
@@ -52,9 +52,9 @@  discard block
 block discarded – undo
52 52
      *
53 53
      * @return void
54 54
      */
55
-    public function alert($message, array $context = array())
55
+    public function alert( $message, array $context = array() )
56 56
     {
57
-        $this->log(LogLevel::ALERT, $message, $context);
57
+        $this->log( LogLevel::ALERT, $message, $context );
58 58
     }
59 59
 
60 60
     /**
@@ -67,9 +67,9 @@  discard block
 block discarded – undo
67 67
      *
68 68
      * @return void
69 69
      */
70
-    public function critical($message, array $context = array())
70
+    public function critical( $message, array $context = array() )
71 71
     {
72
-        $this->log(LogLevel::CRITICAL, $message, $context);
72
+        $this->log( LogLevel::CRITICAL, $message, $context );
73 73
     }
74 74
 
75 75
     /**
@@ -81,9 +81,9 @@  discard block
 block discarded – undo
81 81
      *
82 82
      * @return void
83 83
      */
84
-    public function error($message, array $context = array())
84
+    public function error( $message, array $context = array() )
85 85
     {
86
-        $this->log(LogLevel::ERROR, $message, $context);
86
+        $this->log( LogLevel::ERROR, $message, $context );
87 87
     }
88 88
 
89 89
     /**
@@ -97,9 +97,9 @@  discard block
 block discarded – undo
97 97
      *
98 98
      * @return void
99 99
      */
100
-    public function warning($message, array $context = array())
100
+    public function warning( $message, array $context = array() )
101 101
     {
102
-        $this->log(LogLevel::WARNING, $message, $context);
102
+        $this->log( LogLevel::WARNING, $message, $context );
103 103
     }
104 104
 
105 105
     /**
@@ -110,9 +110,9 @@  discard block
 block discarded – undo
110 110
      *
111 111
      * @return void
112 112
      */
113
-    public function notice($message, array $context = array())
113
+    public function notice( $message, array $context = array() )
114 114
     {
115
-        $this->log(LogLevel::NOTICE, $message, $context);
115
+        $this->log( LogLevel::NOTICE, $message, $context );
116 116
     }
117 117
 
118 118
     /**
@@ -125,9 +125,9 @@  discard block
 block discarded – undo
125 125
      *
126 126
      * @return void
127 127
      */
128
-    public function info($message, array $context = array())
128
+    public function info( $message, array $context = array() )
129 129
     {
130
-        $this->log(LogLevel::INFO, $message, $context);
130
+        $this->log( LogLevel::INFO, $message, $context );
131 131
     }
132 132
 
133 133
     /**
@@ -138,9 +138,9 @@  discard block
 block discarded – undo
138 138
      *
139 139
      * @return void
140 140
      */
141
-    public function debug($message, array $context = array())
141
+    public function debug( $message, array $context = array() )
142 142
     {
143
-        $this->log(LogLevel::DEBUG, $message, $context);
143
+        $this->log( LogLevel::DEBUG, $message, $context );
144 144
     }
145 145
 
146 146
 	/**
Please login to merge, or discard this patch.
future/includes/class-gv-context.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 	 * @return void
32 32
 	 */
33 33
 	public function __set( $key, $value ) {
34
-		$this->_context[$key] = $value;
34
+		$this->_context[ $key ] = $value;
35 35
 	}
36 36
 
37 37
 	/**
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 	 * @return mixed|null
46 46
 	 */
47 47
 	public function __get( $key ) {
48
-		return isset( $this->_context[$key] ) ? $this->_context[$key] : null;
48
+		return isset( $this->_context[ $key ] ) ? $this->_context[ $key ] : null;
49 49
 	}
50 50
 }
51 51
 
Please login to merge, or discard this patch.
future/includes/class-gv-view.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 		$supports = array( 'title', 'revisions' );
87 87
 
88 88
 		if ( $is_hierarchical ) {
89
-			$supports[] = 'page-attributes';
89
+			$supports[ ] = 'page-attributes';
90 90
 		}
91 91
 
92 92
 		/**
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
 		if ( ! $view->form ) {
198 198
 			gravityview()->log->error( 'View #{view_id} tried attaching non-existent Form #{form_id} to it.', array(
199 199
 				'view_id' => $view->ID,
200
-				'form_id' => $view->_gravityview_form_id ? : 0,
200
+				'form_id' => $view->_gravityview_form_id ?: 0,
201 201
 			) );
202 202
 		}
203 203
 
@@ -348,7 +348,7 @@  discard block
 block discarded – undo
348 348
 				 * Add the other keys as they are moved out to ensure we're not using them in core.
349 349
 				 */
350 350
 
351
-			} else if ( ! empty( $GLOBALS['GRAVITYVIEW_TESTS_VIEW_ARRAY_ACCESS_OVERRIDE'] ) ) {
351
+			} else if ( ! empty( $GLOBALS[ 'GRAVITYVIEW_TESTS_VIEW_ARRAY_ACCESS_OVERRIDE' ] ) ) {
352 352
 				/**
353 353
 				 * Suppress exception if specifically testing for array acess.
354 354
 				 */
@@ -361,7 +361,7 @@  discard block
 block discarded – undo
361 361
 			}
362 362
 		}
363 363
 
364
-		if ( ! isset( $this[$offset] ) ) {
364
+		if ( ! isset( $this[ $offset ] ) ) {
365 365
 			return null;
366 366
 		}
367 367
 
@@ -379,7 +379,7 @@  discard block
 block discarded – undo
379 379
 				return $this->template ? $this->template->ID : null;
380 380
 			default:
381 381
 				/** @todo move the rest out and get rid of _data completely! */
382
-				return $this->_data[$offset];
382
+				return $this->_data[ $offset ];
383 383
 		}
384 384
 	}
385 385
 
@@ -430,7 +430,7 @@  discard block
 block discarded – undo
430 430
 			array( 'form' => $this->form ? gravityview_get_form( $this->form->ID ) : null ),
431 431
 			array( 'atts' => $this->settings->as_atts() ),
432 432
 			array( 'fields' => $this->fields->by_visible()->as_configuration() ),
433
-			array( 'template_id' => $this->template? $this->template->ID : null ),
433
+			array( 'template_id' => $this->template ? $this->template->ID : null ),
434 434
 			$this->_data
435 435
 		);
436 436
 	}
Please login to merge, or discard this patch.