Response status codes
Find reason
Response status codes map to a descriptive reason. This map is provided by the convenience class
of Yaspa\Responses\StatusCodes
The example demonstrates how to look up a returned status code.
Please note that the findReason
method will throw an exception if it doesn't recognise the status
code.
use Yaspa\Factory;
use Yaspa\Responses\StatusCodes;
$reason = Factory::make(StatusCodes::class)->findReason(500);