From 58826b6c15d35eace31e8add349f5538aec452e9 Mon Sep 17 00:00:00 2001 From: lotyp Date: Tue, 21 May 2024 12:29:51 +0300 Subject: [PATCH] docs: update README --- README.md | 70 +++++++++++++++++++++++++++++++++---------------------- 1 file changed, 42 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index b8b2084..74f254e 100644 --- a/README.md +++ b/README.md @@ -27,9 +27,7 @@ Wrapper with pre-defined rules around the [PHP-CS-Fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer) package — A tool to automatically fix PHP Coding Standards issues. -This repository aims to provide a standardized way to apply coding standards across multiple projects, ensuring consistency and adherence to best practices. - -By using predefined rulesets, it simplifies the setup process and allows teams to quickly integrate PHP-CS-Fixer into their development workflow. +This repository aims to provide a standardized way to apply coding standards across multiple projects, ensuring consistency and adherence to best practices. By using predefined rulesets, it simplifies the setup process and allows teams to quickly integrate PHP-CS-Fixer into their development workflow.
@@ -37,6 +35,22 @@ If you **like/use** this package, please consider ⭐️ **starring** it. Thanks
+## 📜 Custom Rulesets + +**```WayOfDev\PhpCsFixer\Config\RuleSets\DefaultRuleset::class```** + +Based on **`@Symfony`** ruleset + +* Used by [`@wayofdev`](https://github.com/wayofdev) organization + +**`WayOfDev\PhpCsFixer\Config\RuleSets\ExtendedPERSet::class`** + +Based on **`@PER-CS2.0`** ruleset + +* Used by [`@buggregator`](https://github.com/buggregator) and [`@cycle`](http://github.com/cycle) organizations + +
+ ## 💿 Installation ### → Using composer @@ -53,9 +67,9 @@ composer req --dev wayofdev/cs-fixer-config ### → Setup -- Create PHP file and name it `.php-cs-fixer.dist.php` and place it inside root directory of project. It will be recognized by PHP CS Fixer automatically. +* Create PHP file and name it `.php-cs-fixer.dist.php` and place it inside root directory of project. It will be recognized by PHP CS Fixer automatically. -- Example contents of `.php-cs-fixer.dist.php` file: +* Example contents of `.php-cs-fixer.dist.php` file: ```php + -​ + ### → GitHub Actions -- To use this package in [GitHub Actions](https://github.com/features/actions), add a `coding-standards.yml` workflow to your repository: +* To use this package in [GitHub Actions](https://github.com/features/actions), add a `coding-standards.yml` workflow to your repository: ```yaml --- @@ -219,9 +233,9 @@ composer req --dev wayofdev/cs-fixer-config GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} ``` -​ Or, you can check for one of our pre-configured workflows from any of these repositories: + Or, you can check for one of our pre-configured workflows from any of these repositories: -​ +
@@ -239,13 +253,13 @@ vendor/bin/php-cs-fixer fix -v To use via composer script commands: -- Fixes code to follow coding standards using php-cs-fixer: +* Fixes code to follow coding standards using php-cs-fixer: ```bash composer cs:diff ``` -- Runs php-cs-fixer in dry-run mode and shows diff which will by applied: +* Runs php-cs-fixer in dry-run mode and shows diff which will by applied: ```bash composer cs:fix @@ -255,13 +269,13 @@ To use via composer script commands: **To use with `Makefile`** -- Fixes code to follow coding standards using php-cs-fixer: +* Fixes code to follow coding standards using php-cs-fixer: ```bash make lint-php ``` -- Runs php-cs-fixer in dry-run mode and shows diff which will by applied: +* Runs php-cs-fixer in dry-run mode and shows diff which will by applied: ```bash make lint-diff @@ -279,10 +293,10 @@ This project has a [security policy](.github/SECURITY.md). Thank you for considering contributing to the wayofdev community! We are open to all kinds of contributions. If you want to: -- 🤔 [Suggest a feature](https://github.com/wayofdev/php-cs-fixer-config/issues/new?assignees=&labels=type%3A+enhancement&projects=&template=2-feature-request.yml&title=%5BFeature%5D%3A+) -- 🐛 [Report an issue](https://github.com/wayofdev/php-cs-fixer-config/issues/new?assignees=&labels=type%3A+documentation%2Ctype%3A+maintenance&projects=&template=1-bug-report.yml&title=%5BBug%5D%3A+) -- 📖 [Improve documentation](https://github.com/wayofdev/php-cs-fixer-config/issues/new?assignees=&labels=type%3A+documentation%2Ctype%3A+maintenance&projects=&template=4-docs-bug-report.yml&title=%5BDocs%5D%3A+) -- 👨‍💻 Contribute to the code +* 🤔 [Suggest a feature](https://github.com/wayofdev/php-cs-fixer-config/issues/new?assignees=&labels=type%3A+enhancement&projects=&template=2-feature-request.yml&title=%5BFeature%5D%3A+) +* 🐛 [Report an issue](https://github.com/wayofdev/php-cs-fixer-config/issues/new?assignees=&labels=type%3A+documentation%2Ctype%3A+maintenance&projects=&template=1-bug-report.yml&title=%5BBug%5D%3A+) +* 📖 [Improve documentation](https://github.com/wayofdev/php-cs-fixer-config/issues/new?assignees=&labels=type%3A+documentation%2Ctype%3A+maintenance&projects=&template=4-docs-bug-report.yml&title=%5BDocs%5D%3A+) +* 👨‍💻 Contribute to the code You are more than welcome. Before contributing, kindly check our [contribution guidelines](.github/CONTRIBUTING.md). @@ -302,21 +316,21 @@ You are more than welcome. Before contributing, kindly check our [contribution g ## 🌐 Social Links -- **Twitter:** Follow our organization [@wayofdev](https://twitter.com/intent/follow?screen_name=wayofdev) and the author [@wlotyp](https://twitter.com/intent/follow?screen_name=wlotyp). -- **Discord:** Join our community on [Discord](https://discord.gg/CE3TcCC5vr). +* **Twitter:** Follow our organization [@wayofdev](https://twitter.com/intent/follow?screen_name=wayofdev) and the author [@wlotyp](https://twitter.com/intent/follow?screen_name=wlotyp). +* **Discord:** Join our community on [Discord](https://discord.gg/CE3TcCC5vr).

-Codecov -Follow on Twitter (X) + Codecov + Follow on Twitter (X)


## 🧱 Resources -- Full documentation about all fixers are available here - [PHP-CS-Fixer configuration UI](https://mlocati.github.io/php-cs-fixer-configurator/#version:3.0) +* Full documentation about all fixers is available here - [PHP-CS-Fixer configuration UI](https://mlocati.github.io/php-cs-fixer-configurator/#version:3.0) -- The official [PHP-CS-Fixer documentation](https://github.com/FriendsOfPHP/PHP-CS-Fixer) +* The official [PHP-CS-Fixer documentation](https://github.com/FriendsOfPHP/PHP-CS-Fixer)