Code Duplication    Length = 12-12 lines in 2 locations

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

@@ 412-423 (lines=12) @@
409
	 *
410
	 * @return array $errors
411
	 */
412
	public function get_stored_errors() {
413
414
		$stored_errors = get_option( self::STORED_ERRORS_OPTION );
415
416
		if ( ! is_array( $stored_errors ) ) {
417
			$stored_errors = array();
418
		}
419
420
		$stored_errors = $this->garbage_collector( $stored_errors );
421
422
		return $stored_errors;
423
	}
424
425
	/**
426
	 * Gets the verified errors stored in the database
@@ 432-443 (lines=12) @@
429
	 *
430
	 * @return array $errors
431
	 */
432
	public function get_verified_errors() {
433
434
		$verified_errors = get_option( self::STORED_VERIFIED_ERRORS_OPTION );
435
436
		if ( ! is_array( $verified_errors ) ) {
437
			$verified_errors = array();
438
		}
439
440
		$verified_errors = $this->garbage_collector( $verified_errors );
441
442
		return $verified_errors;
443
	}
444
445
	/**
446
	 * Removes expired errors from the array