Completed
Push — master ( 205fac...3601f2 )
by Michael
03:55
created
admin/includes/class-tgm-plugin-activation.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1945,7 +1945,7 @@  discard block
 block discarded – undo
1945 1945
 		 *
1946 1946
 		 * @since 2.4.0
1947 1947
 		 *
1948
-		 * @return object The TGM_Plugin_Activation object.
1948
+		 * @return TGM_Plugin_Activation The TGM_Plugin_Activation object.
1949 1949
 		 */
1950 1950
 		public static function get_instance() {
1951 1951
 
@@ -2092,7 +2092,7 @@  discard block
 block discarded – undo
2092 2092
 		 *
2093 2093
 		 * @since 2.5.0
2094 2094
 		 *
2095
-		 * @return array CSS classnames.
2095
+		 * @return string[] CSS classnames.
2096 2096
 		 */
2097 2097
 		public function get_table_classes() {
2098 2098
 			return array( 'widefat', 'fixed' );
Please login to merge, or discard this patch.
admin/includes/EDD_SL_Plugin_Updater.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@
 block discarded – undo
64 64
 	 * @uses api_request()
65 65
 	 *
66 66
 	 * @param array   $_transient_data Update array build by WordPress.
67
-	 * @return array Modified update array with custom plugin data.
67
+	 * @return stdClass Modified update array with custom plugin data.
68 68
 	 */
69 69
 	function check_update( $_transient_data ) {
70 70
 
Please login to merge, or discard this patch.
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -270,11 +270,13 @@
 block discarded – undo
270 270
 
271 271
 		$data = array_merge( $this->api_data, $_data );
272 272
 
273
-		if ( $data['slug'] != $this->slug )
274
-			return;
273
+		if ( $data['slug'] != $this->slug ) {
274
+					return;
275
+		}
275 276
 
276
-		if ( empty( $data['license'] ) )
277
-			return;
277
+		if ( empty( $data['license'] ) ) {
278
+					return;
279
+		}
278 280
 
279 281
 		if ( $this->api_url == home_url() ) {
280 282
 			return false; // Don't allow a plugin to ping itself
Please login to merge, or discard this patch.
includes/lasso_autoloader.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 	 * Loads the class file for a given class name.
63 63
 	 *
64 64
 	 * @param string $class The fully-qualified class name.
65
-	 * @return mixed The mapped file name on success, or boolean false on
65
+	 * @return string|false The mapped file name on success, or boolean false on
66 66
 	 * failure.
67 67
 	 */
68 68
 	public function loadClass($class) {
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 	 *
100 100
 	 * @param string $prefix The namespace prefix.
101 101
 	 * @param string $relative_class The relative class name.
102
-	 * @return mixed Boolean false if no mapped file can be loaded, or the
102
+	 * @return false|string Boolean false if no mapped file can be loaded, or the
103 103
 	 * name of the mapped file that was loaded.
104 104
 	 */
105 105
 	protected function loadMappedFile($prefix, $relative_class) {
Please login to merge, or discard this patch.
internal-api/auth.php 2 patches
Doc Comments   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,7 +49,6 @@  discard block
 block discarded – undo
49 49
 	 *
50 50
 	 * @param string $action The AJAX action we are processing.
51 51
 	 * @param string|object $callback_class The class to use for the callback. Either the name of the class or an instance of that class.
52
-	 * @param string $method The name of the callback method.
53 52
 
54 53
 	 */
55 54
 	public function __construct( $action, $callback_class) {
@@ -123,7 +122,7 @@  discard block
 block discarded – undo
123 122
 	 *
124 123
 	 * @access protected
125 124
 	 *
126
-	 * @return bool
125
+	 * @return boolean|null
127 126
 	 */
128 127
 	protected function if_implements() {
129 128
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 	public function __construct( $action, $callback_class) {
56 56
 		if ( ! is_object( $callback_class ) ) {
57 57
 			$this->callback_instance = new $callback_class;
58
-		}else{
58
+		} else{
59 59
 			$this->callback_instance = $callback_class;
60 60
 		}
61 61
 
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
 	protected function check_nonce() {
150 150
 		if ( isset( $this->callback_instance->nonce_action ) ) {
151 151
 			$nonce = $this->callback_instance->nonce_action;
152
-		}else{
152
+		} else{
153 153
 			$nonce = 'lasso_editor';
154 154
 		}
155 155
 
Please login to merge, or discard this patch.
internal-api/route.php 2 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -97,6 +97,7 @@
 block discarded – undo
97 97
 	 *
98 98
 	 * @access protected
99 99
 	 *
100
+	 * @param string $action
100 101
 	 * @return array
101 102
 	 */
102 103
 	protected static function find_callback( $action ) {
Please login to merge, or discard this patch.
Braces   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -36,9 +36,9 @@  discard block
 block discarded – undo
36 36
 				$callback = self::find_callback( strip_tags( $action ) );
37 37
 				if ( is_int( $callback )  ) {
38 38
 					$code = $callback;
39
-				}elseif( ! class_exists( $callback['class'] ) ) {
39
+				} elseif( ! class_exists( $callback['class'] ) ) {
40 40
 					$code = 415;
41
-				}else {
41
+				} else {
42 42
 					$action = str_replace( '-', '_', $action );
43 43
 					$callback_instance = new $callback['class'];
44 44
 					$auth              = self::auth( $action, $callback_instance, $callback['method'] );
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 
62 62
 				}
63 63
 
64
-			}else{
64
+			} else{
65 65
 				$code = 401;
66 66
 				$response = __( 'Nonce not set.', 'lasso' );
67 67
 			}
@@ -167,9 +167,9 @@  discard block
 block discarded – undo
167 167
 
168 168
 		if ( is_string( $response ) ) {
169 169
 			$data[] = $response;
170
-		}elseif( is_array( $response ) ) {
170
+		} elseif( is_array( $response ) ) {
171 171
 			$data = $response;
172
-		}else{
172
+		} else{
173 173
 			$data[] = $code;
174 174
 		}
175 175
 
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
 		nocache_headers();
178 178
 		if ( 200 == $code ) {
179 179
 			wp_send_json_success( $data );
180
-		}else{
180
+		} else{
181 181
 			wp_send_json_error( $data );
182 182
 		}
183 183
 
Please login to merge, or discard this patch.
public/includes/helpers.php 2 patches
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -6,8 +6,8 @@  discard block
 block discarded – undo
6 6
  * If we're on multsite we'll grab the site option which is stored in the main blogs site option tables, otherwise
7 7
  * we'll grab the option which is stored on the single blogs option tables
8 8
  *
9
- * @param unknown $option  string name of the option
10
- * @param unknown $section string name of the section
9
+ * @param string $option  string name of the option
10
+ * @param string $section string name of the section
11 11
  * @param unknown $default string/int default option value
12 12
  * @return the option value
13 13
  * @since 1.0
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
  * Return a CSS class of an automatically supported theme
53 53
  *
54 54
  * @since 0.8.6
55
- * @return a css class if the theme is supported, false if nothing
55
+ * @return string|false css class if the theme is supported, false if nothing
56 56
  */
57 57
 function lasso_get_supported_theme_class() {
58 58
 
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
 *	Used internally as a callback to build a tab or content area for modal addons
229 229
 *
230 230
 *	@param $tab object
231
-*	@param $type string tab or content
231
+*	@param string $type string tab or content
232 232
 *	@uses lasso_modal_addons()
233 233
 *	@since 0.9.4
234 234
 */
Please login to merge, or discard this patch.
Braces   +27 added lines, -19 removed lines patch added patch discarded remove patch
@@ -14,8 +14,9 @@  discard block
 block discarded – undo
14 14
  */
15 15
 function lasso_editor_get_option( $option, $section, $default = '' ) {
16 16
 
17
-	if ( empty( $option ) )
18
-		return;
17
+	if ( empty( $option ) ) {
18
+			return;
19
+	}
19 20
 
20 21
 	if ( function_exists( 'is_multisite' ) && is_multisite() ) {
21 22
 
@@ -42,11 +43,12 @@  discard block
 block discarded – undo
42 43
 
43 44
 	$q = new wp_query( array( 'post_type' => 'ai_galleries', 'post_status' => 'publish' ) );
44 45
 
45
-	if ( $q->have_posts() )
46
-		return true;
47
-	else
48
-		return false;
49
-}
46
+	if ( $q->have_posts() ) {
47
+			return true;
48
+	} else {
49
+			return false;
50
+	}
51
+	}
50 52
 
51 53
 /**
52 54
  * Return a CSS class of an automatically supported theme
@@ -149,13 +151,15 @@  discard block
 block discarded – undo
149 151
 */
150 152
 function lasso_get_post_objects( $postid = '', $taxonomy = 'category') {
151 153
 
152
-	if ( empty( $postid ) )
153
-		$postid = get_the_ID();
154
+	if ( empty( $postid ) ) {
155
+			$postid = get_the_ID();
156
+	}
154 157
 
155 158
 	$objects = 'category' == $taxonomy ? get_the_category( $postid ) : get_the_tags( $postid );
156 159
 
157
-	if ( empty( $objects) )
158
-		return;
160
+	if ( empty( $objects) ) {
161
+			return;
162
+	}
159 163
 
160 164
 	$out = '';
161 165
 	foreach( $objects as $object ) {
@@ -176,8 +180,9 @@  discard block
 block discarded – undo
176 180
 
177 181
 	$objects = 'category' == $taxonomy ? get_categories(array('hide_empty' => 0)) : get_tags(array('hide_empty' => 0));
178 182
 
179
-	if ( empty( $objects) )
180
-		return;
183
+	if ( empty( $objects) ) {
184
+			return;
185
+	}
181 186
 
182 187
 	$out = array();
183 188
 	foreach( $objects as $object ) {
@@ -264,8 +269,9 @@  discard block
 block discarded – undo
264 269
 */
265 270
 function lasso_clean_string( $string = '' ) {
266 271
 
267
-	if ( empty( $string ) )
268
-		return;
272
+	if ( empty( $string ) ) {
273
+			return;
274
+	}
269 275
 
270 276
 	return sanitize_text_field( strtolower( preg_replace('/[\s_]/', '-', $string ) ) );
271 277
 }
@@ -304,11 +310,13 @@  discard block
 block discarded – undo
304 310
 if ( !function_exists( 'lasso_user_can' ) ):
305 311
 	function lasso_user_can( $action = '', $postid = 0 ) {
306 312
 
307
-		if ( empty( $action ) )
308
-			$action = 'edit_posts';
313
+		if ( empty( $action ) ) {
314
+					$action = 'edit_posts';
315
+		}
309 316
 
310
-		if ( empty( $postid ) )
311
-			$postid = get_the_ID();
317
+		if ( empty( $postid ) ) {
318
+					$postid = get_the_ID();
319
+		}
312 320
 
313 321
 		if ( is_user_logged_in() && current_user_can( $action, $postid ) ) {
314 322
 
Please login to merge, or discard this patch.
public/includes/lasso.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@
 block discarded – undo
66 66
 	 *
67 67
 	 * @since    0.0.1
68 68
 	 *
69
-	 * @return    Plugin slug variable.
69
+	 * @return    string slug variable.
70 70
 	 */
71 71
 	public function get_plugin_slug() {
72 72
 		return $this->plugin_slug;
Please login to merge, or discard this patch.
admin/includes/menus/license.php 1 patch
Braces   +20 added lines, -12 removed lines patch added patch discarded remove patch
@@ -106,8 +106,10 @@  discard block
 block discarded – undo
106 106
 		if ( isset( $_POST['edd_license_activate'] ) ) {
107 107
 
108 108
 			// run a quick security check
109
-			if ( ! check_admin_referer( 'lasso_license_nonce', 'lasso_license_nonce' ) )
110
-				return; // get out if we didn't click the Activate button
109
+			if ( ! check_admin_referer( 'lasso_license_nonce', 'lasso_license_nonce' ) ) {
110
+							return;
111
+			}
112
+			// get out if we didn't click the Activate button
111 113
 
112 114
 			// retrieve the license from the database
113 115
 			$license = trim( get_option( 'lasso_license_key' ) );
@@ -124,8 +126,9 @@  discard block
 block discarded – undo
124 126
 			$response = wp_remote_post( LASSO_STORE_URL, array( 'body' => $api_params, 'timeout' => 15, 'sslverify' => false ) );
125 127
 
126 128
 			// make sure the response came back okay
127
-			if ( is_wp_error( $response ) )
128
-				return false;
129
+			if ( is_wp_error( $response ) ) {
130
+							return false;
131
+			}
129 132
 
130 133
 			// decode the license data
131 134
 			$license_data = json_decode( wp_remote_retrieve_body( $response ) );
@@ -143,8 +146,10 @@  discard block
 block discarded – undo
143 146
 		if ( isset( $_POST['edd_license_deactivate'] ) ) {
144 147
 
145 148
 			// run a quick security check
146
-			if ( ! check_admin_referer( 'lasso_license_nonce', 'lasso_license_nonce' ) )
147
-				return; // get out if we didn't click the Activate button
149
+			if ( ! check_admin_referer( 'lasso_license_nonce', 'lasso_license_nonce' ) ) {
150
+							return;
151
+			}
152
+			// get out if we didn't click the Activate button
148 153
 
149 154
 			// retrieve the license from the database
150 155
 			$license = trim( get_option( 'lasso_license_key' ) );
@@ -162,15 +167,17 @@  discard block
 block discarded – undo
162 167
 			$response = wp_remote_post( LASSO_STORE_URL, array( 'body' => $api_params, 'timeout' => 15, 'sslverify' => false ) );
163 168
 
164 169
 			// make sure the response came back okay
165
-			if ( is_wp_error( $response ) )
166
-				return false;
170
+			if ( is_wp_error( $response ) ) {
171
+							return false;
172
+			}
167 173
 
168 174
 			// decode the license data
169 175
 			$license_data = json_decode( wp_remote_retrieve_body( $response ) );
170 176
 
171 177
 			// $license_data->license will be either "deactivated" or "failed"
172
-			if ( $license_data->license == 'deactivated' )
173
-				delete_option( 'lasso_license_status' );
178
+			if ( $license_data->license == 'deactivated' ) {
179
+							delete_option( 'lasso_license_status' );
180
+			}
174 181
 
175 182
 		}
176 183
 	}
@@ -192,8 +199,9 @@  discard block
 block discarded – undo
192 199
 		// Call the custom API.
193 200
 		$response = wp_remote_post( LASSO_STORE_URL, array( 'body' => $api_params, 'timeout' => 15, 'sslverify' => false ) );
194 201
 
195
-		if ( is_wp_error( $response ) )
196
-			return false;
202
+		if ( is_wp_error( $response ) ) {
203
+					return false;
204
+		}
197 205
 
198 206
 		$license_data = json_decode( wp_remote_retrieve_body( $response ) );
199 207
 
Please login to merge, or discard this patch.
admin/includes/menus/settings.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -51,8 +51,9 @@  discard block
 block discarded – undo
51 51
 	function process_settings() {
52 52
 
53 53
 		// bail out if current user isn't and administrator and they are not logged in
54
-		if ( !current_user_can( 'manage_options' ) || !is_user_logged_in() )
55
-			return;
54
+		if ( !current_user_can( 'manage_options' ) || !is_user_logged_in() ) {
55
+					return;
56
+		}
56 57
 
57 58
 		if ( isset( $_POST['action'] ) && 'lasso-editor-settings' == $_POST['action'] && check_admin_referer( 'nonce', 'lasso_editor_settings' ) ) {
58 59
 
@@ -88,8 +89,9 @@  discard block
 block discarded – undo
88 89
 	 */
89 90
 	function lasso_editor_settings_form() {
90 91
 
91
-		if ( !is_user_logged_in() )
92
-			return;
92
+		if ( !is_user_logged_in() ) {
93
+					return;
94
+		}
93 95
 
94 96
 		$article_object   = lasso_editor_get_option( 'article_class', 'lasso_editor' );
95 97
 		$featImgClass    = lasso_editor_get_option( 'featimg_class', 'lasso_editor' );
Please login to merge, or discard this patch.