From 71fd5792f6daa35e1d98f21d7ff2dc8b687013a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Raimondas=20Rimkevi=C4=8Dius=20=28aka=20MekDrop=29?= Date: Thu, 5 Jun 2025 02:13:18 +0300 Subject: [PATCH 1/2] Add phpcs command --- composer.json | 7 +++++++ phpcs.xml | 27 +++++++++++++++++++++++++++ src/ToArrayInterface.php | 13 +++++++------ 3 files changed, 41 insertions(+), 6 deletions(-) create mode 100644 phpcs.xml diff --git a/composer.json b/composer.json index e19bd97..5c0b436 100644 --- a/composer.json +++ b/composer.json @@ -36,5 +36,12 @@ }, "config": { "sort-packages": true + }, + "require-dev": { + "squizlabs/php_codesniffer": "^3.7" + }, + "scripts": { + "phpcs": "phpcs", + "phpcbf": "phpcbf" } } diff --git a/phpcs.xml b/phpcs.xml new file mode 100644 index 0000000..115a3fc --- /dev/null +++ b/phpcs.xml @@ -0,0 +1,27 @@ + + + PHP_CodeSniffer configuration for the ToArrayInterface package + + + + + + src + + + + + + + + + *.php + + + + + + + + + diff --git a/src/ToArrayInterface.php b/src/ToArrayInterface.php index d49aa48..ae69005 100644 --- a/src/ToArrayInterface.php +++ b/src/ToArrayInterface.php @@ -1,4 +1,5 @@ Date: Thu, 5 Jun 2025 02:14:20 +0300 Subject: [PATCH 2/2] Remove custom phpcs rules --- phpcs.xml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/phpcs.xml b/phpcs.xml index 115a3fc..13d8a3b 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -10,18 +10,6 @@ - - - - *.php - - - - - - - -