Code Duplication    Length = 7-7 lines in 2 locations

projects/plugins/jetpack/json-endpoints/jetpack/class.jetpack-json-api-plugins-modify-endpoint.php 1 location

@@ 243-249 (lines=7) @@
240
			$this->log[$plugin][] = __( 'Plugin activated.', 'jetpack' );
241
		}
242
243
		if ( ! $this->bulk && isset( $has_errors ) ) {
244
			$plugin = $this->plugins[0];
245
			if ( $permission_error ) {
246
				return new WP_Error( 'unauthorized_error', $this->log[$plugin]['error'], 403 );
247
			}
248
249
			return new WP_Error( 'activation_error', $this->log[$plugin]['error'] );
250
		}
251
	}
252

projects/plugins/jetpack/json-endpoints/jetpack/class.jetpack-json-api-plugins-modify-v1-2-endpoint.php 1 location

@@ 161-167 (lines=7) @@
158
			$this->log[ $plugin ][] = __( 'Plugin activated.', 'jetpack' );
159
		}
160
161
		if ( ! $this->bulk && $has_errors ) {
162
			$plugin = $this->plugins[0];
163
			if ( $permission_error ) {
164
				return new WP_Error( 'unauthorized_error', $this->log[ $plugin ]['error'], 403 );
165
			}
166
167
			return new WP_Error( 'activation_error', $this->log[ $plugin ]['error'] );
168
		}
169
	}
170