https://github.com/matomo-org/matomo/commit/b38578b468d694534db5fabe356db5ffdc58bd6e - Mouve

Site d'origine

Permalink
Browse files

Introduce PHP CS to improve code quality (#16755)

* Adds PHP CS with a basic config

* automatically check coding style for pull requests

* Disallow usage of eval & create_function and force using Common::safe_unserialize instead of unserialize

* Forbid inline control structures

* fix test
  • Loading branch information
sgiehl committed Jan 15, 2021
1 parent 6f957d1 commit b38578b468d694534db5fabe356db5ffdc58bd6e
@@ -0,0 +1,17 @@
name: PHPCS check

on: pull_request

jobs:
phpcs:
name: PHPCS
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: composer install --dev --prefer-dist --no-progress --no-suggest
- name: PHPCS check
uses: chekalsky/phpcs-action@v1
with:
phpcs_bin_path: './vendor/bin/phpcs'
enable_warnings: true
@@ -61,7 +61,9 @@
},
"require-dev": {
"lox/xhprof": "dev-master",
"mayflower/mo4-coding-standard": "~6.0",
"phpunit/phpunit": "~8.5",
"squizlabs/php_codesniffer": "^3.5",
"symfony/var-dumper": "~2.6.0",
"symfony/yaml": "~2.6.0"
},

0 comments on commit b38578b

Please sign in to comment.

Raccourcis

Commandes

Fermer