mac1qc / http-status-code
Helper to get HTTP status code by using common name
v1.0.2
2024-09-12 23:11 UTC
Requires
- php: ^8.1
Requires (Dev)
- phpunit/phpunit: ^11.3
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Helper to get HTTP status code by using common name, so it's easier to read while coding.
How to install?
In your project, run in your terminal
$ composer require mac1qc/http-status-code
How to use?
Instead of writting your Status code in number like:
if ($statusCode === 200) { return 'something'; }
Do something like:
if ($statusCode === StatusCode::OK->value) { return 'something'; }
Wanna show your appreciation?
If you find that library useful, you can buy me a coffee/beer