Code Duplication    Length = 12-12 lines in 2 locations

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

@@ 440-451 (lines=12) @@
437
	 *
438
	 * @return array $errors
439
	 */
440
	public function get_stored_errors() {
441
442
		$stored_errors = get_option( self::STORED_ERRORS_OPTION );
443
444
		if ( ! is_array( $stored_errors ) ) {
445
			$stored_errors = array();
446
		}
447
448
		$stored_errors = $this->garbage_collector( $stored_errors );
449
450
		return $stored_errors;
451
	}
452
453
	/**
454
	 * Gets the verified errors stored in the database
@@ 460-471 (lines=12) @@
457
	 *
458
	 * @return array $errors
459
	 */
460
	public function get_verified_errors() {
461
462
		$verified_errors = get_option( self::STORED_VERIFIED_ERRORS_OPTION );
463
464
		if ( ! is_array( $verified_errors ) ) {
465
			$verified_errors = array();
466
		}
467
468
		$verified_errors = $this->garbage_collector( $verified_errors );
469
470
		return $verified_errors;
471
	}
472
473
	/**
474
	 * Removes expired errors from the array