Early Bird Registration for DrupalCon Atlanta is now open! By registering during our Early Bird Registration window, you’ll save $100. This window ends on 19 January 2025 and will go by quickly, so don’t wait!
Running phpcs --standard=Drupal,DrupalPractice --extensions=php,inc,module,install,info,test,profile,theme modules/custom/codesnippet/
shows the following warnings/errors, which should be fixed.
FILE: src/Plugin/CKEditorPlugin/CodeSnippet.php
------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 2 WARNINGS AFFECTING 3 LINES
------------------------------------------------------------------------------------------------------------
74 | WARNING | [ ] t() calls should be avoided in classes, use
| | \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
79 | WARNING | [ ] t() calls should be avoided in classes, use
| | \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
95 | ERROR | [x] Use null coalesce operator instead of ternary operator.
------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------
Issue fork codesnippet-3335630
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
jay jangid CreditAttribution: jay jangid at Dotsquares Ltd. commentedCreated MR , please review.
Thank you.
Comment #4
avpadernoIt would be better to apply both the PHP_CodeSniffer Drupal rulesets, instead of using just one.
Comment #6
ashutosh ahirwal CreditAttribution: ashutosh ahirwal at Specbee for Specbee commentedUpdated MR7 with some fixes.
Error found in readme can't update because its a function.
Comment #7
avpadernoThe README.txt file has been updated in the project branch. The MR needs to be updated.
Comment #8
avpadernoComment #10
sakthi_dev CreditAttribution: sakthi_dev at Specbee for Drupal India Association commentedPlease review. Updated the MR by rebase.
Comment #11
avpadernoComment #12
sakthi_dev CreditAttribution: sakthi_dev at Specbee for Drupal India Association commentedAddressed comments in MR. Please review.
Comment #13
nikolay shapovalov CreditAttribution: nikolay shapovalov as a volunteer commentedUpdate IS, add latest phpcs report.
Comment #14
nikolay shapovalov CreditAttribution: nikolay shapovalov as a volunteer commentedThanks, looks good.
Mark this as RTBC.