<?php

namespace engine\http;

enum HTTPCode: int
{
    case OK = 200;

    case MovedPermanently = 301;
    case Found = 302;

    case BadRequest = 400;
    case Unauthorized = 401;
    case NotFound = 404;
    case Forbidden = 403;
    case UnavailableForLegalReasons = 451;

    case InternalServerError = 500;
    case NotImplemented = 501;

    public function getTitle(): string {
        return preg_replace('/(?<!^)([A-Z])/', ' $1', $this->name);
    }
}