*/ final class ThreadRunResponseLastError implements ResponseContract { /** * @use ArrayAccessible */ use ArrayAccessible; use Fakeable; private function __construct( public string $code, public string $message, ) { } /** * Acts as static factory, and returns a new Response instance. * * @param array{code: string, message: string} $attributes */ public static function from(array $attributes): self { return new self( $attributes['code'], $attributes['message'], ); } /** * {@inheritDoc} */ public function toArray(): array { return [ 'code' => $this->code, 'message' => $this->message, ]; } }