Skip to content

declare(strict_types=1) causes static code check failure #72

Closed
@lenaorobei

Description

@lenaorobei

The old version of PHP Codesniffer, as well as old sniffs, are used for a static code check.

As a result, when adding declare(strict_types=1); causes sniffer to throw a warning on the PSR-2 standard.
screen shot 2018-03-26 at 3 15 18 pm

As a workaround in #69 I had to add @codingStandardsIgnoreFile annotation. The old version of PHP Codesniffer has made also impossible to use @codingStandardsIgnoreStart and @codingStandardsIgnoreEnd at the beginning of the file.

Suggest updating "squizlabs/php_codesniffer": "1.5.3" to "squizlabs/php_codesniffer": "3.0.1" and use updated sniffs for Magento 2.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions