Skip to content

Commit

Permalink
Merge pull request #4 from LordSimal/main
Browse files Browse the repository at this point in the history
add cakephp CS ruleset
  • Loading branch information
rrd108 authored Jan 19, 2024
2 parents ad5c7a7 + 503bc66 commit d027f89
Show file tree
Hide file tree
Showing 10 changed files with 428 additions and 90 deletions.
23 changes: 22 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,25 @@ jobs:
vendor/bin/phpunit --coverage-clover=coverage.xml
else
vendor/bin/phpunit
fi
fi
cs:
name: Coding Standard
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
extensions: mbstring, intl
coverage: none
tools: cs2pr

- name: Composer install
uses: ramsey/composer-install@v2

- name: Run phpcs
run: vendor/bin/phpcs --report=checkstyle src/ tests/ | cs2pr
14 changes: 11 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"psr/http-server-middleware": "^1.0"
},
"require-dev": {
"cakephp/cakephp-codesniffer": "@stable",
"phpunit/phpunit": "^10.1"
},
"autoload": {
Expand All @@ -19,11 +20,18 @@
},
"autoload-dev": {
"psr-4": {
"Cors\\Test\\": "tests",
"Cake\\Test\\": "./vendor/cakephp/cakephp/tests"
"TestApp\\": "tests/test_app/src",
"Rrd108\\Cors\\Tests\\": "tests"
}
},
"scripts": {
"test": "phpunit"
"test": "phpunit",
"cs-check": "phpcs --colors -p ./src ./tests",
"cs-fix": "phpcbf --colors -p ./src ./tests"
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
}
}
Loading

0 comments on commit d027f89

Please sign in to comment.