Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"rawr/phpunit-data-provider": "3.3.1",
"rector/rector": "1.2.10 || 2.1.7",
"rector/type-perfect": "1.0.0 || 2.1.0",
"squizlabs/php_codesniffer": "4.0.1",
"thecodingmachine/phpstan-safe-rule": "1.2.0 || 1.4.1"
},
"suggest": {
Expand Down Expand Up @@ -75,13 +76,15 @@
"check:dynamic": [
"@check:tests"
],
"check:php:codesniffer": "phpcs --standard=config/phpcs.xml config src tests",
"check:php:fixer": "\"./.phive/php-cs-fixer\" --config=config/php-cs-fixer.php fix --dry-run -v --show-progress=dots --diff bin src tests config",
"check:php:lint": "parallel-lint src tests config bin",
"check:php:rector": "rector --no-progress-bar --dry-run --config=config/rector.php",
"check:php:stan": "phpstan --no-progress --configuration=config/phpstan.neon",
"check:static": [
"@check:composer:normalize",
"@check:php:fixer",
"@check:php:codesniffer",
"@check:php:lint",
"@check:php:rector",
"@check:php:stan"
Expand All @@ -99,8 +102,10 @@
"fix:php": [
"@fix:composer:normalize",
"@fix:php:rector",
"@fix:php:codesniffer",
"@fix:php:fixer"
],
"fix:php:codesniffer": "phpcbf --standard=config/phpcs.xml config src tests",
"fix:php:fixer": "\"./.phive/php-cs-fixer\" --config=config/php-cs-fixer.php fix bin src tests",
"fix:php:rector": "rector --config=config/rector.php",
"phpstan:baseline": "phpstan --configuration=config/phpstan.neon --generate-baseline=config/phpstan-baseline.neon --allow-empty-baseline"
Expand All @@ -109,6 +114,7 @@
"check": "Runs all dynamic and static code checks.",
"check:composer:normalize": "Checks the formatting and structure of the composer.json.",
"check:dynamic": "Runs all dynamic code checks (i.e., currently, the unit tests).",
"check:php:codesniffer": "Checks the code style with PHP_CodeSniffer.",
"check:php:fixer": "Checks the code style with PHP CS Fixer.",
"check:php:lint": "Checks the syntax of the PHP code.",
"check:php:rector": "Checks the code for possible code updates and refactoring.",
Expand All @@ -121,6 +127,7 @@
"fix": "Runs all fixers",
"fix:composer:normalize": "Reformats and sorts the composer.json file.",
"fix:php": "Autofixes all autofixable issues in the PHP code.",
"fix:php:codesniffer": "Reformats the code with PHP_CodeSniffer.",
"fix:php:fixer": "Fixes autofixable issues found by PHP CS Fixer.",
"fix:php:rector": "Fixes autofixable issues found by Rector.",
"phpstan:baseline": "Updates the PHPStan baseline file to match the code."
Expand Down
12 changes: 12 additions & 0 deletions config/phpcs.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<ruleset name="MyIntervals coding standard">
<arg name="colors"/>
<arg name="extensions" value="php"/>

<rule ref="Generic.Files.LineLength">
<properties>
<property name="lineLimit" value="120"/>
<property name="absoluteLineLimit" value="120"/>
</properties>
</rule>
</ruleset>