Code Duplication    Length = 12-12 lines in 2 locations

packages/connection/src/class-error-handler.php 2 locations

@@ 402-413 (lines=12) @@
399
	 *
400
	 * @return array $errors
401
	 */
402
	public function get_stored_errors() {
403
404
		$stored_errors = get_option( self::STORED_ERRORS_OPTION );
405
406
		if ( ! is_array( $stored_errors ) ) {
407
			$stored_errors = array();
408
		}
409
410
		$stored_errors = $this->garbage_collector( $stored_errors );
411
412
		return $stored_errors;
413
	}
414
415
	/**
416
	 * Gets the verified errors stored in the database
@@ 422-433 (lines=12) @@
419
	 *
420
	 * @return array $errors
421
	 */
422
	public function get_verified_errors() {
423
424
		$verified_errors = get_option( self::STORED_VERIFIED_ERRORS_OPTION );
425
426
		if ( ! is_array( $verified_errors ) ) {
427
			$verified_errors = array();
428
		}
429
430
		$verified_errors = $this->garbage_collector( $verified_errors );
431
432
		return $verified_errors;
433
	}
434
435
	/**
436
	 * Removes expired errors from the array