PHPMD and PHPCS Camelcase for Tests

Viewed 5284

I just installed both PHPMD and PHPCS with my Project.

Now, I would like to customize them a bit, but can't seem to achieve it.

I get 2 warnings that I would like to remove for all my project:

  • phpcs: public method name MyTests::my_test_that_should_pass is not in camel caps format
  • phpmd: the method my_test_that_should_pass is not in camel case

With PHPMD, I tried to change : .composer/vendor/phpmd/phpmd/src/main/resources/rulesets/controversial.xml and set allow-underscore-test to true like mentioned here

With PHPCS, I don't really know how to do it.

Any idea???

https://phpmd.org/rules/controversial.html

1 Answers
Related