drupal-rector icon indicating copy to clipboard operation
drupal-rector copied to clipboard

Use this->t instead of t

Open chrfritsch opened this issue 2 years ago • 1 comments

Description

It checks if a t() call can be converted to $this->t()

To Test

  • Add steps to test this feature

Drupal.org issue

Provide a link to the issue from https://www.drupal.org/project/rector/issues. If no issue exists, please create one and link to this PR.

chrfritsch avatar Nov 09 '22 13:11 chrfritsch

There is already a rule. Perhaps the rule can be reused.

https://github.com/rectorphp/rector/blob/main/docs/rector_rules_overview.md#funccalltomethodcallrector

tobiasbaehr avatar Nov 09 '22 14:11 tobiasbaehr