Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Florian Krämer committed Jun 2, 2023
0 parents commit e7e5255
Show file tree
Hide file tree
Showing 23 changed files with 2,360 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# This file is for unifying the coding style for different editors and IDEs
# editorconfig.org

root = true

[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[**.php]
indent_style = space
indent_size = 4

[**.json]
indent_style = space
indent_size = 4

[**.xml]
indent_style = space
indent_size = 4
70 changes: 70 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: CI

on: [push, pull_request]

jobs:
testsuite:
name: Unittests
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
php-version: ['8.1', '8.2']

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: mbstring, json, fileinfo
tools: pecl
coverage: pcov

- name: Composer install
run: |
if [[ ${{ matrix.prefer-lowest == 'prefer-lowest' }} ]]; then
composer update --prefer-lowest --prefer-stable
else
composer install
fi
- name: Run PHPUnit
run: |
if [[ ${{ matrix.php-version }} == '8.1' ]]; then
bin/phpunit --coverage-clover=coverage.xml
else
bin/phpunit
fi
- name: Code Coverage Report
if: success() && matrix.php-version == '8.1'
uses: codecov/codecov-action@v3

cs-stan:
name: Coding Standard & Static Analysis
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: mbstring, json, fileinfo
coverage: none
tools: pecl

- name: Composer install
run: composer update --prefer-lowest --prefer-stable

- name: Run phpcs
run: bin/phpcs --version && bin/phpcs --report=source --standard=phpcs.xml

- name: Run phpstan
run: bin/phpstan -V && bin/phpstan analyse src -l 8 --error-format=github
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/bin
/vendor
/.phpunit.cache
.idea
.phpunit.result.cache
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2022 Florian Krämer

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:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
36 changes: 36 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"name": "phauthentic/specification-pattern",
"description": "MIT",
"type": "library",
"require": {
"php": "^8.1"
},
"require-dev": {
"phpunit/phpunit": "^10.1",
"phpstan/phpstan": "^1.10",
"squizlabs/php_codesniffer": "^3.7"
},
"license": "MIT",
"autoload": {
"psr-4": {
"Phauthentic\\Specification\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Phauthentic\\Specification\\Test\\": "tests/Test/",
"Phauthentic\\Specification\\Test\\Specifications\\": "tests/Specifications/"
}
},
"authors": [
{
"name": "Florian Krämer"
}
],
"scripts": {
},
"config": {
"sort-packages": true,
"bin-dir": "bin"
}
}
Loading

0 comments on commit e7e5255

Please sign in to comment.