Skip to content

PSR12.Files.FileHeader conflicts with Generic.Files.LineEndings #2878

@on2

Description

@on2

If I run phpcbf --sniffs="PSR12.Files.FileHeader,Generic.Files.LineEndings" myfile.php where myfile.php is as follows (with \r\n line endings):

<?php $name = 'Foo';

Then I receive an error:

PHPCBF FAILED TO FIX 1 FILE

The file now contains 25 empty lines betwen the opening <?php tag and $name = 'Foo';. With \r or\n line endings the file is fixed as expected:

<?php 

$name = 'Foo';

Tested with dev-master and v3.5.4.

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