Skip to content

PHP files which contain phtml in the name detect as a template #147

Closed
@iGerchak

Description

@iGerchak

Preconditions

  1. Magento coding standard 4.0

Steps to reproduce

  1. Create Block with name AmpHtmlBlock.php with the following content:
<?php

namespace Block;

/**
 * Class AmpHtmlBlock
 */
class AmpHtmlBlock
{
    /**
     *
     */
    public function test()
    {
        $this->test();
    }
}

Expected result

There shouldn't be any warnings

Actual result

FILE: .../Block/AmpHtmlBlock.php
-------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-------------------------------------------------------------------------------------------
 15 | WARNING | Usage of $this in template files is deprecated.
-------------------------------------------------------------------------------------------

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions