Code Duplication    Length = 12-12 lines in 2 locations

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

@@ 431-442 (lines=12) @@
428
	 *
429
	 * @return array $errors
430
	 */
431
	public function get_stored_errors() {
432
433
		$stored_errors = get_option( self::STORED_ERRORS_OPTION );
434
435
		if ( ! is_array( $stored_errors ) ) {
436
			$stored_errors = array();
437
		}
438
439
		$stored_errors = $this->garbage_collector( $stored_errors );
440
441
		return $stored_errors;
442
	}
443
444
	/**
445
	 * Gets the verified errors stored in the database
@@ 451-462 (lines=12) @@
448
	 *
449
	 * @return array $errors
450
	 */
451
	public function get_verified_errors() {
452
453
		$verified_errors = get_option( self::STORED_VERIFIED_ERRORS_OPTION );
454
455
		if ( ! is_array( $verified_errors ) ) {
456
			$verified_errors = array();
457
		}
458
459
		$verified_errors = $this->garbage_collector( $verified_errors );
460
461
		return $verified_errors;
462
	}
463
464
	/**
465
	 * Removes expired errors from the array