<?php
/**
 * WordPress error test double.
 *
 * @package GravityOps\Core
 */

/**
 * Stores a test error code and message.
 */
final class WP_Error {
	/**
	 * Error code.
	 *
	 * @var string
	 */
	private string $code;

	/**
	 * Error message.
	 *
	 * @var string
	 */
	private string $message;

	/**
	 * Creates an error.
	 *
	 * @param string $code    Error code.
	 * @param string $message Error message.
	 */
	public function __construct( string $code, string $message ) {
		$this->code    = $code;
		$this->message = $message;
	}

	/**
	 * Returns the error code.
	 *
	 * @return string
	 */
	public function get_error_code(): string {
		return $this->code;
	}

	/**
	 * Returns the error message.
	 *
	 * @return string
	 */
	public function get_error_message(): string {
		return $this->message;
	}
}
