aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2020-09-22 20:16:23 +0200
committerArthurHoaro <arthur@hoa.ro>2020-11-08 14:09:15 +0100
commite09bb93e18a333eff8e6a4156f5b58ba9c7d25cd (patch)
treebeef67d31dc6aa8c23d16e53f6cd18379b57b843
parentd9d71b10c3bc70a0881d630b37dc4e918c9e812f (diff)
downloadShaarli-e09bb93e18a333eff8e6a4156f5b58ba9c7d25cd.tar.gz
Shaarli-e09bb93e18a333eff8e6a4156f5b58ba9c7d25cd.tar.zst
Shaarli-e09bb93e18a333eff8e6a4156f5b58ba9c7d25cd.zip
Coding style: switch PHPCS to PSR12
Also temporarily ignore test code (one step at a time). Reference: https://www.php-fig.org/psr/psr-12/ Related to #95
-rw-r--r--Makefile4
-rw-r--r--phpcs.xml6
2 files changed, 3 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 7415887a..181b61c4 100644
--- a/Makefile
+++ b/Makefile
@@ -27,10 +27,6 @@ PHPCS := $(BIN)/phpcs
27code_sniffer: 27code_sniffer:
28 @$(PHPCS) 28 @$(PHPCS)
29 29
30### - errors filtered by coding standard: PEAR, PSR1, PSR2, Zend...
31PHPCS_%:
32 @$(PHPCS) --report-full --report-width=200 --standard=$*
33
34### - errors by Git author 30### - errors by Git author
35code_sniffer_blame: 31code_sniffer_blame:
36 @$(PHPCS) --report-gitblame 32 @$(PHPCS) --report-gitblame
diff --git a/phpcs.xml b/phpcs.xml
index 29b95d56..349dc566 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -5,13 +5,13 @@
5 <file>index.php</file> 5 <file>index.php</file>
6 <file>application</file> 6 <file>application</file>
7 <file>plugins</file> 7 <file>plugins</file>
8 <file>tests</file> 8<!-- <file>tests</file>-->
9 9
10 <exclude-pattern>*/*.css</exclude-pattern> 10 <exclude-pattern>*/*.css</exclude-pattern>
11 <exclude-pattern>*/*.js</exclude-pattern> 11 <exclude-pattern>*/*.js</exclude-pattern>
12 12
13 <arg name="colors"/> 13 <arg name="colors"/>
14 14
15 <rule ref="PSR1"/> 15 <rule ref="PSR12"/>
16 <rule ref="PSR2"/> 16 <rule ref="Generic.Arrays.DisallowLongArraySyntax"/>
17</ruleset> 17</ruleset>