Skip to content

Commit d41aabd

Browse files
committed
Maintenance: makefile, codesniffer, phpstan, gitignore
1 parent 57e7a03 commit d41aabd

6 files changed

Lines changed: 20 additions & 11 deletions

File tree

‎.editorconfig‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ indent_style = tab
1111
indent_size = tab
1212
tab_width = 4
1313

14-
[{*.json, *.yaml, *.yml, *.md}]
14+
[*.{json,yaml,yml,md}]
1515
indent_style = space
1616
indent_size = 2

‎.gitattributes‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
# Not archived
21
.docs export-ignore
3-
tests export-ignore
2+
.github export-ignore
43
.editorconfig export-ignore
54
.gitattributes export-ignore
65
.gitignore export-ignore
7-
.travis.yml export-ignore
86
Makefile export-ignore
9-
phpstan.neon export-ignore
107
README.md export-ignore
8+
phpstan.neon export-ignore
119
ruleset.xml export-ignore
10+
tests export-ignore

‎.gitignore‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,4 @@
66
/composer.lock
77

88
# Tests
9-
/temp
109
/coverage.xml

‎Makefile‎

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,31 @@
1-
.PHONY: install qa cs csf phpstan tests coverage
2-
1+
.PHONY: install
32
install:
43
composer update
54

5+
.PHONY: qa
66
qa: phpstan cs
77

8+
.PHONY: cs
89
cs:
910
ifdef GITHUB_ACTION
10-
vendor/bin/phpcs --standard=ruleset.xml --encoding=utf-8 --colors -nsp -q --report=checkstyle src tests | cs2pr
11+
vendor/bin/phpcs --standard=ruleset.xml --encoding=utf-8 --extensions="php,phpt" --colors -nsp -q --report=checkstyle src tests | cs2pr
1112
else
12-
vendor/bin/phpcs --standard=ruleset.xml --encoding=utf-8 --colors -nsp src tests
13+
vendor/bin/phpcs --standard=ruleset.xml --encoding=utf-8 --extensions="php,phpt" --colors -nsp src tests
1314
endif
1415

16+
.PHONY: csf
1517
csf:
16-
vendor/bin/phpcbf --standard=ruleset.xml --encoding=utf-8 --colors -nsp src tests
18+
vendor/bin/phpcbf --standard=ruleset.xml --encoding=utf-8 --extensions="php,phpt" --colors -nsp src tests
1719

20+
.PHONY: phpstan
1821
phpstan:
1922
vendor/bin/phpstan analyse -c phpstan.neon
2023

24+
.PHONY: tests
2125
tests:
2226
vendor/bin/tester -s -p php --colors 1 -C tests/Cases
2327

28+
.PHONY: coverage
2429
coverage:
2530
ifdef GITHUB_ACTION
2631
vendor/bin/tester -s -p phpdbg --colors 1 -C --coverage coverage.xml --coverage-src src tests/Cases

‎phpstan.neon‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,5 @@ parameters:
1414
paths:
1515
- src
1616
- .docs
17+
18+
ignoreErrors:

‎ruleset.xml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
<element key="src" value="Contributte\ReCaptcha"/>
1111
<element key="tests" value="Tests"/>
1212
</property>
13+
<property name="extensions" type="array">
14+
<element key="php" value="php"/>
15+
<element key="phpt" value="phpt"/>
16+
</property>
1317
</properties>
1418
</rule>
1519

0 commit comments

Comments
 (0)