Code Duplication    Length = 12-12 lines in 2 locations

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

@@ 393-404 (lines=12) @@
390
	 *
391
	 * @return array $errors
392
	 */
393
	public function get_stored_errors() {
394
395
		$stored_errors = get_option( self::STORED_ERRORS_OPTION );
396
397
		if ( ! is_array( $stored_errors ) ) {
398
			$stored_errors = array();
399
		}
400
401
		$stored_errors = $this->garbage_collector( $stored_errors );
402
403
		return $stored_errors;
404
	}
405
406
	/**
407
	 * Gets the verified errors stored in the database
@@ 413-424 (lines=12) @@
410
	 *
411
	 * @return array $errors
412
	 */
413
	public function get_verified_errors() {
414
415
		$verified_errors = get_option( self::STORED_VERIFIED_ERRORS_OPTION );
416
417
		if ( ! is_array( $verified_errors ) ) {
418
			$verified_errors = array();
419
		}
420
421
		$verified_errors = $this->garbage_collector( $verified_errors );
422
423
		return $verified_errors;
424
	}
425
426
	/**
427
	 * Removes expired errors from the array