mac1qc / http-status-code
Helper to get HTTP status code by using common name
Installs: 3
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/mac1qc/http-status-code
Requires
- php: ^8.1
Requires (Dev)
- phpunit/phpunit: ^11.3
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