Inspection with PHP-CS-Fixer custom rules.
Hi, I am having trouble trying to figure this out.
I have a custom .php_cs.dist configuration that has always worked just fine.
I have written a custom Php-Cs-Fixer rule, which works on cli, however when I have it present in my .php_cs.dist configuration file I do not see the warnings in PhpStorm.
I am confused, because on the command line, php-cs-fixer is using the same config and it is working fine.
I have also tried to search for info on how inspection works in PhPStorm w/ php-cs-fixer but have found no information.
Please sign in to leave a comment.
Could you please share the custom config you are referring to? If it depends on something else, please share this something else too.
.php_cs.dist
App/CodingStandard/Fixer/LineBreakBetweenMethodArgumentsFixer.php
App/CodingStandard/Utils/TokensAnalyzer.php
These were pulled (and maybe modified) from https://github.com/PedroTroller/PhpCSFixer-Custom-Fixers which I plan to base some customer fixers from.
Thank you! I created a project out of these files, configured PHP-CS-Fixer to use the .php_cs file as a custom coding standard, and it worked for me like a charm:
https://recordit.co/6697421YeM
Could you please record a similar screencast?
Thanks Eugene!
I created a scratch project and it is working for me, so the issue is on my end (in my other project, with my custom fixer) and not PHPStorm.
Thanks again, sorry to bother you.
and my issue on my custom fixer was a
file_put_contentsI was using for debugging (via php-csfixer cli) that I forgot to comment out.
thanks for being my rubber duck!
Quack.