Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement a tool to automatically fix PHP Coding Standards issues #10

Open
2 tasks
vitormattos opened this issue Aug 29, 2022 · 0 comments
Open
2 tasks
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@vitormattos
Copy link
Member

vitormattos commented Aug 29, 2022

Context:

In PHP it is not mandatory to use coding standards (spaces, brace placement, etc). To define coding standards in the language, the PSRs were created.

Tasks:

  • Implement of friendsofphp/php-cs-fixer package and apply standard definition.
  • Implement script in composer.json to run the check and fix. Example:
     "scripts": {
         "post-install-cmd": [
             "composer install -d tests/tools/php-cs-fixer/"
         ],
         "post-update-cmd": [
             "composer install -d tests/tools/php-cs-fixer/"
         ],
         "cs:check": "tests/tools/php-cs-fixer/vendor/bin/php-cs-fixer fix --dry-run --diff",
         "cs:fix": "tests/tools/php-cs-fixer/vendor/bin/php-cs-fixer fix"
@vitormattos vitormattos added enhancement New feature or request good first issue Good for newcomers labels Aug 29, 2022
@vitormattos vitormattos changed the title Implementar análise estática de padrão de codificação Implement a tool to automatically fix PHP Coding Standards issues Aug 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant