Completed
Pull Request — master (#116)
by
unknown
02:26
created
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/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.
includes/process/delete.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,8 +30,9 @@
 block discarded – undo
30 30
 		$postid = isset( $data['postid'] ) ? $data['postid'] : false;
31 31
 
32 32
 		// bail out if teh current user can't publish posts
33
-		if ( !lasso_user_can( 'delete_post', $postid ) )
34
-			return;
33
+		if ( !lasso_user_can( 'delete_post', $postid ) ) {
34
+					return;
35
+		}
35 36
 
36 37
 		$args = array(
37 38
 			'ID'   			=> (int) $postid,
Please login to merge, or discard this patch.
includes/process/gallery.php 1 patch
Braces   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -119,9 +119,9 @@  discard block
 block discarded – undo
119 119
 		$gallery_ids  = isset( $data['gallery_ids'] ) ? $data['gallery_ids'] : false;
120 120
 		if ( ! empty( $data ) && $data[ 'gallery_type' ] ) {
121 121
 			$type = $data[ 'gallery_type' ];
122
-		}elseif ( ! empty( $options ) && $options[ 'galleryType' ] ) {
122
+		} elseif ( ! empty( $options ) && $options[ 'galleryType' ] ) {
123 123
 			$type = $options[ 'galleryType' ];
124
-		}else{
124
+		} else{
125 125
 			$type = false;
126 126
 		}
127 127
 
@@ -173,8 +173,9 @@  discard block
 block discarded – undo
173 173
 	 */
174 174
 	private function get_the_images( $image_ids = '' ) {
175 175
 
176
-		if ( empty( $image_ids ) )
177
-			return;
176
+		if ( empty( $image_ids ) ) {
177
+					return;
178
+		}
178 179
 
179 180
 		$image_ids  = array_map( 'intval', explode( ',', $image_ids ) );
180 181
 
Please login to merge, or discard this patch.