Closed
Description
Description
Right now the only one option to use helpers inside blocks - is following code:
$this->helper(<helper_class>)
, but this Magento2.Templates.ThisInTemplate rule complains against it. As result - we have to add to ignore Magento2.Templates.ThisInTemplate in many view files.
Examples:
Try to find "Magento2.Templates.ThisInTemplate" in following commit:
magento/magento2@514e3d0
Expected behavior
We should not have any complains from static tests when running valid code
Benefits
We will not have useless disabling of this rule
Additional information
Option 1: this code example should be added to exception list
Option 2: there should be developed or provided recommended solution how to avoid it