Skip to content

DeclareStrictTypes to comply with PSR12.Files.FileHeader.IncorrectOrder #1685

Open
@Morgy93

Description

@Morgy93

Hello,

is it possible for SlevomatCodingStandard.TypeHints.DeclareStrictTypes to set the declare() below the file docblock to comply with PSR12.Files.FileHeader.IncorrectOrder?

So, instead of:

<?php

declare(strict_types=1);

/**
 * This file contains an example of coding styles.
 */

It needs to be:

<?php

/**
 * This file contains an example of coding styles.
 */

declare(strict_types=1);

Otherwise, it throws The file-level docblock must follow the opening PHP tag in the file header (PSR12.Files.FileHeader.IncorrectOrder).

Any idea?

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