Code Duplication    Length = 12-12 lines in 2 locations

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

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