Skip to content

Commit 3da8088

Browse files
committed
Initial commit: Make package production-ready with documentation, tests, CI setup, and Git configuration.
0 parents  commit 3da8088

File tree

10 files changed

+3169
-0
lines changed

10 files changed

+3169
-0
lines changed

.gitattributes

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Set the default behavior to automatically normalize line endings
2+
* text=auto
3+
4+
# Explicitly declare text files
5+
*.php text
6+
*.md text
7+
*.json text
8+
*.yml text
9+
*.yaml text
10+
11+
# Binary files
12+
*.png binary
13+
*.jpg binary
14+
*.gif binary

.github/workflows/phpunit.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: PHP Unit Tests
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
test:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- name: Checkout code
11+
uses: actions/checkout@v2
12+
13+
- name: Set up PHP
14+
uses: shivammathur/setup-php@v2
15+
with:
16+
php-version: '7.4' # Change to your required PHP version
17+
18+
- name: Install dependencies
19+
run: composer install
20+
21+
- name: Run tests
22+
run: vendor/bin/phpunit tests

.gitignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Composer dependencies
2+
/vendor/
3+
4+
# PHPUnit test results
5+
/tests/_output/
6+
7+
# IDE files
8+
/.idea/
9+
/.vscode/
10+
11+
# OS generated files
12+
.DS_Store
13+
Thumbs.db

LICENSE

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
MIT License
2+
3+
Copyright (c) [year] Wowpack
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6+
7+
...
8+
9+
[Full license text continues here]

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# PHP Enum Package
2+
3+
## Description
4+
This package provides enum support for PHP, allowing for easy management and usage of enumerations.
5+
6+
## Installation
7+
You can install the package via Composer:
8+
9+
```bash
10+
composer require wowpack/php-enum
11+
```
12+
13+
## Usage
14+
To use the package, implement the `Enumerable` interface in your enum classes. Here is an example:
15+
16+
```php
17+
use Wowpack\Enumeration\Enumerable;
18+
19+
class MyEnum implements Enumerable
20+
{
21+
// Implement the required methods...
22+
}
23+
```
24+
25+
## License
26+
This package is licensed under the MIT License.

composer.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"name": "wowpack/php-enum",
3+
"description": "Enum support for PHP",
4+
"type": "library",
5+
"require": {
6+
"php": "^7.2 || ^8.0",
7+
"illuminate/support": "^8.0"
8+
},
9+
"autoload": {
10+
"psr-4": {
11+
"Wowpack\\Enumeration\\": "src/"
12+
}
13+
},
14+
"require-dev": {
15+
"phpunit/phpunit": "^9.5"
16+
},
17+
"minimum-stability": "stable",
18+
"prefer-stable": true
19+
}

0 commit comments

Comments
 (0)