lchrusciel / ApiTestCase

Handy PHPUnit test case for testing JSON APIs in your Symfony applications.
MIT License
410 stars 35 forks source link

Cleanup codebase #105

Open lchrusciel opened 6 years ago

lchrusciel commented 6 years ago

We should try some tool that will help to maintain clean code base.

E.g. https://github.com/Symplify/EasyCodingStandard

antkaz commented 5 years ago

I can advise https://github.com/slevomat/coding-standard

lchrusciel commented 5 years ago

Isn't it part of EsayCodingStandard?

Anyway, I have started to work on ECS integration in #137, but maybe I will give a try to Slevomat. Also, feel free to help me :)

antkaz commented 5 years ago

Not quite. I am not familiar with EasyCodingStandard, but judging by the documentation, it uses the rules of the PHP_CodeSniffer.

Levomat also uses code-sniffer, but it also contains many additional rules (they also exist in phpstan) that can be customized for your project.

In my project, I started using PHP_CodeSniffer, but then I added the Slevomat rules and configured them as necessary (which does not allow PHP_CodeSniffer to do).

lchrusciel commented 5 years ago

I truly believe that ECS is just a wrapper around Slevomat, as there are a lot of Slevomat rules used internally like here: https://github.com/Symplify/EasyCodingStandard/blob/master/config/clean-code.yml#L2-L12

Still, anything that will make the code better by automatization is good for me :)

stefandoorn commented 5 years ago

What about the Sylius Coding Standard rules for PHPStan?

antkaz commented 5 years ago

Really! Looked bad)

https://github.com/Symplify/EasyCodingStandard/blob/master/composer.json#L22