Skip to content
This repository was archived by the owner on Aug 7, 2023. It is now read-only.
This repository was archived by the owner on Aug 7, 2023. It is now read-only.

Pipe exceptions in catch block raise violations #293

@mamyn0va

Description

@mamyn0va

atom version : 1.27.2

linter-php version : 1.5.1

When I lint this PHP 7.1 code in Atom...

try {
  $this->someFunction();
} catch (MyException | \Exception $e) {
  $this->logger->error('Oops');
}

... I get many violations such as Unexpected '|'.

But when I lint from the CMD (php -l), I get no error.

I thought that the linter-php package only calls the PHP linter and then display the output, but obviously this is not what happens.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions