python (65.2k questions)
javascript (44.3k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (13k questions)
how to disallow arrays with extra whitespaces with php codesniffer ruleset?
I tried couple of sniffs in my phpcs.xml file but couldn't come up with a solution for such cases:
$arrays = array("1", 2, 2 , 3 ); // not allowed due to extra whitespaces
$arrays = [1 , 2...
mirza
Votes: 0
Answers: 0
CodeSniffer not working on PhpStorm/MacOS but it work in Docker
I use PhpStorm 2021.3 on MacOS (Apple Sillicon M1). I'm not sure the problem is with PhpStorm but PHP Code Sniffer doesn't work.
When I type this command it doesn't show any errors in the code and I'm...

pirmax
Votes: 0
Answers: 0
vs code phpcs only works sometimes
Sometimes I open a php file in VS Code and no linting occurs until I open the linting console from the bottom, switch over to the terminal pane where a dialog shows up that asks me if I trust the auth...

ubsd
Votes: 0
Answers: 0
Referenced sniff "SlevomatCodingStandard.ControlStructures.RequireNullCoalesceOperator" does not exist
Just installed php_codesniffer and coder:
composer global require "squizlabs/php_codesniffer=*"
composer global require drupal/coder
After installation, run phpcs -i and the result is as fo...
River Zhao
Votes: 0
Answers: 2