- Issue created by @sunil jolapara
- šŗšøUnited States sunil jolapara 3265 Summitrun Drive, Independence, KY, 41051
- š®š¹Italy apaderno Brescia, š®š¹
A Drupal 7 module cannot use the null coalescing operator, since Drupal 7 still runs on PHP 5.6, not PHP 7.
- š®š¹Italy apaderno Brescia, š®š¹
The issue summary for PHP_CodeSniffer issues should always show the report given from PHP_CodeSniffer and the arguments passed to
phpcs
.Furthermore, since GitLab CI is now enabled for all the projects, GitLab CI should be used to get PHP_CodeSniffer errors/warnings.
- Assigned to cleavinjosh
- šµšPhilippines cleavinjosh
Hi @sunil jolapara,
Thank you for providing an MR. I applied MR!1, it was applied smoothly and fixed most of the phpcs issues.
These are the remaining issues after I ran
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml
:ā menu_banner git:(7.x-1.x) curl https://git.drupalcode.org/project/menu_banner/-/merge_requests/1.diff | patch -p1 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 4705 0 4705 0 0 10746 0 --:--:-- --:--:-- --:--:-- 10742 patching file menu_banner.install patching file menu_banner.module ā menu_banner git:(7.x-1.x) ā .. ā contrib git:(main) ā phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml menu_banner FILE: /Users/interns/Demo-site/drupal_11_test/install-dir/drupal_11_test_site/web/modules/contrib/menu_banner/menu_banner.admin.inc ----------------------------------------------------------------------------------------------------------------------------------- FOUND 5 ERRORS AFFECTING 5 LINES ----------------------------------------------------------------------------------------------------------------------------------- 18 | ERROR | [x] Use null coalesce operator instead of ternary operator. 32 | ERROR | [x] Use null coalesce operator instead of ternary operator. 33 | ERROR | [x] Array indentation error, expected 6 spaces but found 7 35 | ERROR | [x] Use null coalesce operator instead of ternary operator. 36 | ERROR | [x] Array indentation error, expected 6 spaces but found 7 ----------------------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY ----------------------------------------------------------------------------------------------------------------------------------- Time: 222ms; Memory: 10MB ā contrib git:(main) ā
Thank you.
- Merge request !2Created a new merge request to get the list of all the PHP_CodeSniffer errors/warnings to fix ā (Open) created by cleavinjosh
- šµšPhilippines cleavinjosh
cleavinjosh ā changed the visibility of the branch 3476379-phpcs-issues to hidden.
- šµšPhilippines cleavinjosh
Hi,
Please review, check and advise on MR!1. Thank you.