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
20 changes: 12 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,21 @@ composer-install: ## install php packages
phpunit: ## Run phpunit
php ./vendor/bin/phpunit --colors=always

.PHONY: php-cs-fixer
php-cs-fixer: ## Run php-cs-fixer
php ./vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.php --diff --dry-run --verbose

.PHONY: php-cs-fixer-check
php-cs-fixer-check: ## Run php-cs-fixer-check
.PHONY: cs-fix
cs-fix: ## Run php-cs-fixer
php ./vendor/bin/php-cs-fixer fix --dry-run

.PHONY: cs-fix-check
cs-fix-check: ## Run php-cs-fixer-check
php ./vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.php --diff --dry-run --verbose

.PHONY: phpstan
phpstan: ## Run phpstan
php ./vendor/bin/phpstan

.PHONY: code-quality
code-quality: php-cs-fixer-check phpunit phpstan ## Run code quality checks
.PHONY: rector
rector: ## Run phpstan
php ./vendor/bin/rector --dry-run

.PHONY: test
test: cs-fix-check rector phpunit phpstan ## Run code quality tests
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"require-dev": {
"phpunit/phpunit": "^9",
"friendsofphp/php-cs-fixer": "^3.64",
"phpstan/phpstan": "^1.12"
"phpstan/phpstan": "^1.12",
"rector/rector": "^1.2.8"
}
}
24 changes: 24 additions & 0 deletions rector.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php

declare(strict_types=1);

use Rector\Config\RectorConfig;
use Rector\Php83\Rector\ClassMethod\AddOverrideAttributeToOverriddenMethodsRector;

return RectorConfig::configure()
->withPaths([
__DIR__.'/src',
__DIR__.'/tests',
])
->withSkip([
AddOverrideAttributeToOverriddenMethodsRector::class,
])
->withPreparedSets(
deadCode: true,
codeQuality: true,
typeDeclarations: true,
privatization: true,
earlyReturn: true,
strictBooleans: true,
)
->withPhpSets();
Loading