Problem/Motivation
Running phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,yml shows the following warning which should be fixed.
FILE: /web/modules/custom/media_thumbnails/src/Form/MediaThumbnailConfigForm.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------------------
62 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
-----------------------------------------------------------------------------------------------------------------------------------------
Comments
Comment #3
andrii momotov commentedFixed the warning reported by PHP_CodeSniffer and created MR. Please review. Thanks!
Comment #4
andrii momotov commentedComment #5
andrii momotov commentedFixed the warning reported by PHP_CodeSniffer and created MR. Please review. Thanks!
Comment #6
paraderojether commentedComment #7
paraderojether commentedHi
I reviewed MR!4, applied against Media Thumbnails 8.x-1.x-dev and there is one phpcs error shown below:
Thank you.
Comment #8
paraderojether commentedI fixed the remaining issue, please review.
Thank you.
Comment #9
riddhi.addweb commentedThe mentioned issue is resolved, & I have also checked and it is working as expected. I am attaching the Screenshots & doing RTBC for the same.
Comment #12
renrhafMerged, thank you all!