Skip to content

Wrong T_FN token when $this->fn #2859

Closed
@BafS

Description

@BafS

Having $xxx->fn in the code is reported as a T_FN, which is wrong.

Example:

<?php
class Test {
    public function foo() {
        $this->fn = 'a';
    }
}

$this->fn gives

^ array:8 [
  "code" => "PHPCS_T_FN"
  "type" => "T_FN"
  "content" => "fn"
  "line" => 7
  "column" => 16
  "length" => 2
  "level" => 2
  "conditions" => array:2 [
    2 => 361
    11 => 346
  ]
]

Related issue: slevomat/coding-standard#896

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions