Problem/Motivation
C:\xampp\htdocs\abc\drupal\modules>phpcs --standard="Drupal,DrupalPractice" --extensions=php,module,inc,install,test,profile,theme,info,txt,md,yml panels_ajax_tab
FILE: ...ocs\abc\drupal\modules\panels_ajax_tab\panels_ajax_tab.admin.inc
----------------------------------------------------------------------
FOUND 3 ERRORS AND 2 WARNINGS AFFECTING 5 LINES
----------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n"
| | but found "\r\n"
217 | WARNING | [ ] Unused variable $pid.
218 | ERROR | [ ] The array declaration extends to column 88 (the
| | limit is 80). The array content should be split
| | up over multiple lines
237 | WARNING | [ ] Unused variable $key.
251 | ERROR | [ ] The array declaration extends to column 96 (the
| | limit is 80). The array content should be split
| | up over multiple lines
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...tdocs\abc\drupal\modules\panels_ajax_tab\panels_ajax_tab.install
----------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
----------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n"
| | but found "\r\n"
12 | WARNING | [ ] Unused variable $configs.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...htdocs\abc\drupal\modules\panels_ajax_tab\panels_ajax_tab.module
----------------------------------------------------------------------
FOUND 8 ERRORS AND 4 WARNINGS AFFECTING 12 LINES
----------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n"
| | but found "\r\n"
200 | ERROR | [ ] The array declaration extends to column 100 (the
| | limit is 80). The array content should be split
| | up over multiple lines
280 | ERROR | [x] Use null coalesce operator instead of ternary
| | operator.
329 | ERROR | [x] Use null coalesce operator instead of ternary
| | operator.
340 | ERROR | [x] Use null coalesce operator instead of ternary
| | operator.
343 | WARNING | [ ] Unused variable $key2.
499 | WARNING | [ ] Unused variable $pid.
500 | ERROR | [ ] The array declaration extends to column 88 (the
| | limit is 80). The array content should be split
| | up over multiple lines
540 | WARNING | [ ] Unused variable $pid.
541 | ERROR | [ ] The array declaration extends to column 88 (the
| | limit is 80). The array content should be split
| | up over multiple lines
641 | WARNING | [ ] Unused variable $key.
673 | ERROR | [ ] All functions defined in a module file must be
| | prefixed with the module's name, found
| | "getallheaders" but expected
| | "panels_ajax_tab_getallheaders"
----------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...els_ajax_tab\plugins\content_types\panels_ajax_tab_container.inc
----------------------------------------------------------------------
FOUND 1 ERROR AND 3 WARNINGS AFFECTING 4 LINES
----------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n"
| | but found "\r\n"
8 | WARNING | [ ] Unused variable $plugin.
99 | WARNING | [ ] Unused variable $layout.
129 | WARNING | [ ] #description values usually have to run through
| | t() for translation
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...s\panels_ajax_tab\plugins\content_types\panels_ajax_tab_tabs.inc
----------------------------------------------------------------------
FOUND 4 ERRORS AND 6 WARNINGS AFFECTING 10 LINES
----------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n"
| | but found "\r\n"
8 | WARNING | [ ] Unused variable $plugin.
150 | WARNING | [ ] Unused variable $content.
218 | WARNING | [ ] #description values usually have to run through
| | t() for translation
260 | ERROR | [x] Use null coalesce operator instead of ternary
| | operator.
261 | WARNING | [ ] #description values usually have to run through
| | t() for translation
267 | ERROR | [x] Use null coalesce operator instead of ternary
| | operator.
268 | WARNING | [ ] #description values usually have to run through
| | t() for translation
280 | ERROR | [x] Use null coalesce operator instead of ternary
| | operator.
281 | WARNING | [ ] #description values usually have to run through
| | t() for translation
----------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
Time: 757ms; Memory: 14MB
Steps to reproduce
Run the following command : phpcs --standard="Drupal,DrupalPractice" --extensions=php,module,inc,install,test,profile,theme,info,txt,md,yml /10.1.x/drupal/modules/contrib/panels_ajax_tab
Proposed resolution
Fix all the PHP coding standard issues.