From 27a478f9e6906cf662f55604b072b13bb8d11f11 Mon Sep 17 00:00:00 2001 From: Giuseppe Mazzapica Date: Thu, 24 Feb 2022 07:21:13 +0100 Subject: [PATCH] Simplify PHPCS check on CI --- .github/workflows/php-qa.yml | 4 +--- src/QueryTemplate.php | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/php-qa.yml b/.github/workflows/php-qa.yml index 0a1e25d..3be2069 100644 --- a/.github/workflows/php-qa.yml +++ b/.github/workflows/php-qa.yml @@ -26,9 +26,7 @@ jobs: uses: ramsey/composer-install@v2 - name: Check code styles - run: | - ./vendor/bin/phpcs -q --report-full --report-checkstyle="phpcs-report.xml" --runtime-set testVersion 7.2- --runtime-set ignore_errors_on_exit 1 - cs2pr --graceful-warnings phpcs-report.xml + run: ./vendor/bin/phpcs -q --report=checkstyle | cs2pr - name: Check Psalm run: ./vendor/bin/psalm --output-format=github --no-cache diff --git a/src/QueryTemplate.php b/src/QueryTemplate.php index b3aed69..7127dd8 100644 --- a/src/QueryTemplate.php +++ b/src/QueryTemplate.php @@ -84,7 +84,7 @@ public function findTemplate(?\WP_Query $query = null, bool $filters = true): st $found = ''; while ($types && !$found) { $type = array_shift($types); - $found = $this->finder->findFirst($leaves[$type], (string) $type); + $found = $this->finder->findFirst($leaves[$type], (string)$type); $filters and $found = $this->applyFilter("{$type}_template", $found, $query); }