From 53b375654b7d86cddcfe9e9b60b6f06d39de35de Mon Sep 17 00:00:00 2001 From: Jarrod Swift Date: Tue, 30 Nov 2021 13:34:11 +1030 Subject: [PATCH 1/2] Use prebuild action that will create phpcs annotations --- .github/workflows/php.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index d75ad370..2ea6c436 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -38,4 +38,6 @@ jobs: run: composer run-script test - name: Run linter to check code style - run: composer run-script check-style + uses: chekalsky/phpcs-action@v1 + with: + enable_warnings: true From 6a396e4dd4c4e38b75e4446ef437085aa515c953 Mon Sep 17 00:00:00 2001 From: Jarrod Swift Date: Tue, 30 Nov 2021 13:38:14 +1030 Subject: [PATCH 2/2] Add phpcs configuration file --- .phpcs.xml | 9 +++++++++ src/BigCommerce/Api/Catalog/BrandsApi.php | 1 + 2 files changed, 10 insertions(+) create mode 100644 .phpcs.xml diff --git a/.phpcs.xml b/.phpcs.xml new file mode 100644 index 00000000..fd7103ec --- /dev/null +++ b/.phpcs.xml @@ -0,0 +1,9 @@ + + + Coding standard configuration for the Bigcommerce V3 API Client. + + src + tests + + + \ No newline at end of file diff --git a/src/BigCommerce/Api/Catalog/BrandsApi.php b/src/BigCommerce/Api/Catalog/BrandsApi.php index 605a145b..e3510987 100644 --- a/src/BigCommerce/Api/Catalog/BrandsApi.php +++ b/src/BigCommerce/Api/Catalog/BrandsApi.php @@ -33,6 +33,7 @@ class BrandsApi extends ResourceApi private const BRAND_ENDPOINT = 'catalog/brands/%d'; private const BRANDS_ENDPOINT = 'catalog/brands'; + public const DO_NOT_MERGE = "this because it's only to test the new phpcs github action with annotations. This line is clearly too long."; public const FILTER_INCLUDE_FIELDS = 'include_fields'; public const FILTER_EXCLUDE_FIELDS = 'exclude_fields';