From 192b3a30e01d1481c6935d73602a455032f296b8 Mon Sep 17 00:00:00 2001 From: Nuno Maduro Date: Mon, 27 Jun 2022 10:56:35 +0100 Subject: [PATCH] Uses Laravel Pint --- .php-cs-fixer.dist.php | 28 ---------------------------- README.md | 2 +- composer.json | 6 +++--- 3 files changed, 4 insertions(+), 32 deletions(-) delete mode 100644 .php-cs-fixer.dist.php diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php deleted file mode 100644 index 4dad68e..0000000 --- a/.php-cs-fixer.dist.php +++ /dev/null @@ -1,28 +0,0 @@ -in(__DIR__ . DIRECTORY_SEPARATOR . 'tests') - ->in(__DIR__ . DIRECTORY_SEPARATOR . 'src') - ->append(['.php_cs']); - -$rules = [ - '@Symfony' => true, - 'phpdoc_no_empty_return' => false, - 'array_syntax' => ['syntax' => 'short'], - 'yoda_style' => false, - 'binary_operator_spaces' => [ - 'operators' => [ - '=>' => 'align', - '=' => 'align', - ], - ], - 'concat_space' => ['spacing' => 'one'], - 'not_operator_with_space' => false, -]; - -$rules['increment_style'] = ['style' => 'post']; - -return (new PhpCsFixer\Config()) - ->setUsingCache(true) - ->setRules($rules) - ->setFinder($finder); diff --git a/README.md b/README.md index 4e5390e..1a564ba 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ This package provides a wonderful **PHP Skeleton** to start building your next p composer create-project nunomaduro/skeleton-php --prefer-source PackageName ``` -🧹 Keep a modern codebase with **PHP CS Fixer**: +🧹 Keep a modern codebase with **Pint**: ```bash composer lint ``` diff --git a/composer.json b/composer.json index 3e13570..2135d40 100644 --- a/composer.json +++ b/composer.json @@ -13,8 +13,8 @@ "php": "^8.1" }, "require-dev": { + "laravel/pint": "^0.2.0", "pestphp/pest": "^1.21.3", - "friendsofphp/php-cs-fixer": "^3.8.0", "phpstan/phpstan": "^1.7.12", "symfony/var-dumper": "^6.1.0" }, @@ -38,8 +38,8 @@ } }, "scripts": { - "lint": "php-cs-fixer fix -v", - "test:lint": "php-cs-fixer fix -v --dry-run", + "lint": "pint -v", + "test:lint": "pint --test -v", "test:types": "phpstan analyse --ansi", "test:unit": "pest --colors=always", "test": [