From b38578b468d694534db5fabe356db5ffdc58bd6e Mon Sep 17 00:00:00 2001 From: Stefan Giehl Date: Fri, 15 Jan 2021 08:53:48 +0100 Subject: 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 --- .github/workflows/phpcs.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/workflows/phpcs.yml (limited to '.github') diff --git a/.github/workflows/phpcs.yml b/.github/workflows/phpcs.yml new file mode 100644 index 0000000000..169942b071 --- /dev/null +++ b/.github/workflows/phpcs.yml @@ -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 \ No newline at end of file -- cgit v1.2.3