Skip to content

Commit e0d5174

Browse files
First Commit.
0 parents  commit e0d5174

File tree

6 files changed

+1722
-0
lines changed

6 files changed

+1722
-0
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/vendor
2+
/.phpunit.cache

LICENSE.md

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) Chikondi Kamwendo <[email protected]>
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

README.md

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# STATUSES
2+
3+
A PHP package that houses commonly used status classes and enums that can be used in PHP projects.
4+
5+
<p>
6+
<!-- <a href="https://github.com/codelabmw/statuses/actions"><img alt="GitHub Workflow Status (master)" src="https://github.com/codelabmw/statuses/actions/workflows/tests.yml/badge.svg"></a> -->
7+
<a href="https://packagist.org/packages/codelabmw/statuses"><img alt="Total Downloads" src="https://img.shields.io/packagist/dt/codelabmw/statuses"></a>
8+
<a href="https://packagist.org/packages/codelabmw/statuses"><img alt="Latest Version" src="https://img.shields.io/packagist/v/codelabmw/statuses"></a>
9+
<a href="https://packagist.org/packages/codelabmw/statuses"><img alt="License" src="https://img.shields.io/packagist/l/codelabmw/statuses"></a>
10+
</p>
11+
12+
## Installation
13+
14+
```bash
15+
composer require codelabmw/statuses
16+
```
17+
18+
## Usage
19+
20+
In your codebase simply import the status class or enum that will best serve your use case.
21+
22+
```php
23+
<?php
24+
25+
use Codelabmw\Statuses\Http;
26+
27+
class IndexController
28+
{
29+
public function __invoke()
30+
{
31+
return response(
32+
data: 'Hello World',
33+
statusCode: Http::OK,
34+
);
35+
}
36+
}
37+
```
38+
39+
## Epilogue
40+
41+
We would love to hear your feedback and be happy to receive contributions. Give a star if you found the package useful.

composer.json

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"name": "codelabmw/statuses",
3+
"description": "A PHP package that houses commonly used status classes and enums that can be used in PHP projects.",
4+
"type": "library",
5+
"license": "MIT",
6+
"authors": [
7+
{
8+
"name": "Chikondi Kamwendo",
9+
"email": "[email protected]"
10+
}
11+
],
12+
"autoload": {
13+
"psr-4": {
14+
"Codelabmw\\Statuses\\": "src/"
15+
}
16+
},
17+
"autoload-dev": {
18+
"psr-4": {
19+
"Tests\\": "tests/"
20+
}
21+
},
22+
"minimum-stability": "dev",
23+
"require": {
24+
"php": "^8.3"
25+
},
26+
"require-dev": {
27+
"phpunit/phpunit": "^12.0@dev"
28+
},
29+
"scripts": {
30+
"test": "./vendor/bin/phpunit"
31+
}
32+
}

0 commit comments

Comments
 (0)