-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Maintenance: codesniffer, phpstan, makefile
- Loading branch information
Showing
6 changed files
with
61 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
# Not archived | ||
.docs export-ignore | ||
tests export-ignore | ||
.github export-ignore | ||
.editorconfig export-ignore | ||
.gitattributes export-ignore | ||
.gitignore export-ignore | ||
.travis.yml export-ignore | ||
Makefile export-ignore | ||
phpstan.neon export-ignore | ||
README.md export-ignore | ||
phpstan.neon export-ignore | ||
ruleset.xml export-ignore | ||
tests export-ignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,34 @@ | ||
.PHONY: install qa cs csf phpstan tests coverage-clover coverage-html | ||
|
||
.PHONY: install | ||
install: | ||
composer update | ||
|
||
.PHONY: qa | ||
qa: phpstan cs | ||
|
||
.PHONY: cs | ||
cs: | ||
ifdef GITHUB_ACTION | ||
vendor/bin/codesniffer -q --report=checkstyle src tests | cs2pr | ||
vendor/bin/phpcs --standard=ruleset.xml --encoding=utf-8 --extensions="php,phpt" --colors -nsp -q --report=checkstyle src tests | cs2pr | ||
else | ||
vendor/bin/codesniffer src tests | ||
vendor/bin/phpcs --standard=ruleset.xml --encoding=utf-8 --extensions="php,phpt" --colors -nsp src tests | ||
endif | ||
|
||
.PHONY: csf | ||
csf: | ||
vendor/bin/codefixer src tests | ||
vendor/bin/phpcbf --standard=ruleset.xml --encoding=utf-8 --extensions="php,phpt" --colors -nsp src tests | ||
|
||
.PHONY: phpstan | ||
phpstan: | ||
vendor/bin/phpstan analyse -l max -c phpstan.neon src | ||
vendor/bin/phpstan analyse -c phpstan.neon | ||
|
||
.PHONY: tests | ||
tests: | ||
vendor/bin/tester -s -p php --colors 1 -C tests/cases | ||
|
||
coverage-clover: | ||
vendor/bin/tester -s -p phpdbg --colors 1 -C --coverage ./coverage.xml --coverage-src ./src tests/cases | ||
vendor/bin/tester -s -p php --colors 1 -C tests/Cases | ||
|
||
coverage-html: | ||
vendor/bin/tester -s -p phpdbg --colors 1 -C --coverage ./coverage.html --coverage-src ./src tests/cases | ||
.PHONY: coverage | ||
coverage: | ||
ifdef GITHUB_ACTION | ||
vendor/bin/tester -s -p phpdbg --colors 1 -C --coverage coverage.xml --coverage-src src tests/Cases | ||
else | ||
vendor/bin/tester -s -p phpdbg --colors 1 -C --coverage coverage.html --coverage-src src tests/Cases | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,18 @@ | ||
includes: | ||
- vendor/phpstan/phpstan-deprecation-rules/rules.neon | ||
- vendor/phpstan/phpstan-nette/extension.neon | ||
- vendor/phpstan/phpstan-nette/rules.neon | ||
- vendor/phpstan/phpstan-strict-rules/rules.neon | ||
- vendor/contributte/phpstan/phpstan.neon | ||
|
||
parameters: | ||
level: 9 | ||
phpVersion: 80100 | ||
|
||
scanDirectories: | ||
- src | ||
|
||
fileExtensions: | ||
- php | ||
|
||
paths: | ||
- src | ||
- .docs | ||
|
||
ignoreErrors: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
<?xml version="1.0"?> | ||
<ruleset> | ||
<!-- Contributte Coding Standard --> | ||
<rule ref="./vendor/ninjify/coding-standard/contributte.xml"> | ||
<exclude name="PSR2.Methods.FunctionCallSignature.MultipleArguments"/> | ||
</rule> | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ruleset name="Contributte" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="vendor/squizlabs/php_codesniffer/phpcs.xsd"> | ||
<!-- Rulesets --> | ||
<rule ref="./vendor/contributte/qa/ruleset-8.0.xml"/> | ||
|
||
<!-- Specific --> | ||
<rule ref="SlevomatCodingStandard.Files.TypeNameMatchesFileName"> | ||
<properties> | ||
<!-- Rules --> | ||
<rule ref="SlevomatCodingStandard.Files.TypeNameMatchesFileName"> | ||
<properties> | ||
<property name="rootNamespaces" type="array"> | ||
<element key="src" value="Nettrine\Extensions\Oroinc"/> | ||
<element key="tests/cases" value="Tests\Cases"/> | ||
<element key="tests/fixtures" value="Tests\Fixtures"/> | ||
<element key="tests/toolkit" value="Tests\Toolkit"/> | ||
<element key="tests" value="Tests"/> | ||
</property> | ||
<property name="extensions" type="array"> | ||
<element key="php" value="php"/> | ||
<element key="phpt" value="phpt"/> | ||
</property> | ||
</properties> | ||
</rule> | ||
</properties> | ||
</rule> | ||
|
||
<!--Exclude folders --> | ||
<exclude-pattern>/tests/tmp</exclude-pattern> | ||
<!-- Excludes --> | ||
<exclude-pattern>/tests/tmp</exclude-pattern> | ||
</ruleset> |