ApiTestCase icon indicating copy to clipboard operation
ApiTestCase copied to clipboard

Cleanup codebase

Open lchrusciel opened this issue 7 years ago • 6 comments

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

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

lchrusciel avatar Dec 20 '17 09:12 lchrusciel

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

antkaz avatar Nov 06 '18 08:11 antkaz

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 :)

lchrusciel avatar Nov 06 '18 08:11 lchrusciel

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).

antkaz avatar Nov 06 '18 08:11 antkaz

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 :)

lchrusciel avatar Nov 06 '18 08:11 lchrusciel

What about the Sylius Coding Standard rules for PHPStan?

stefandoorn avatar Nov 06 '18 08:11 stefandoorn

Really! Looked bad)

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

antkaz avatar Nov 06 '18 08:11 antkaz