
$ phpcs --standard=Drupalpractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml user_bundle/
Xdebug: [Step Debug] Time-out connecting to debugging client, waited: 200 ms. Tried: localhost:9000 (through xdebug.client_host/xdebug.client_port) :-(
FILE: C:\Users\SI-001\Downloads\user_bundle\src\UserTypeForm.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 9 WARNINGS AFFECTING 9 LINES
-----------------------------------------------------------------------------------------------------------------------------------------
25 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
28 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
42 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
43 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
48 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
51 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
57 | 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
80 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
-----------------------------------------------------------------------------------------------------------------------------------------
FILE: C:\Users\SI-001\Downloads\user_bundle\src\UserTypeListBuilder.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
-----------------------------------------------------------------------------------------------------------------------------------------
20 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
22 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
-----------------------------------------------------------------------------------------------------------------------------------------
Time: 633ms; Memory: 8MB
Comment | File | Size | Author |
---|---|---|---|
#9 | 3301299.png | 148.63 KB | Munavijayalakshmi |
#8 | updated_coding_standard-3301301-4.patch | 4.08 KB | sourabhjain |
#5 | updated_coding_standard-3301301-4.patch.txt | 4.08 KB | sourabhjain |
#2 | t-calls-should-be-avoided-3301299-.patch | 4.22 KB | rakhi soni |
Comments
Comment #2
rakhi soni CreditAttribution: rakhi soni at Smashing Infolabs Pvt. Ltd. for Smashing Infolabs Pvt. Ltd. commentedKindly review patch,,
Comment #3
amateescu CreditAttribution: amateescu for Tag1 Consulting commentedThese are not needed, the parent classes already use the trait.
Also, can you combine this patch with #3301301: Drupal coding standard issue? Thanks.
Comment #4
sourabhjainI am working on this
Comment #5
sourabhjainI have checked the patch which is mentioned is perfectly solving both the ticket.
Attaching the patch here too.
Please review.
Comment #6
sourabhjainComment #7
jaykumar95@sourabhjain you mistakenly uploaded .txt file, please upload patch file
Comment #8
sourabhjainThanks for noticing @jay
Uploaded the patch file.
Comment #9
Munavijayalakshmi CreditAttribution: Munavijayalakshmi at Valuebound for Valuebound commentedComment #10
Munavijayalakshmi CreditAttribution: Munavijayalakshmi at Valuebound for Valuebound commentedComment #12
amateescu CreditAttribution: amateescu for Tag1 Consulting commentedCommitted to 8.x-1.x, thanks!