Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Documentation for Magento2.Templates.ThisInTemplate rule #108

Copy link
Copy link
Closed
@ihor-sviziev

Description

@ihor-sviziev
Issue body actions

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

lenaorobei

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.