Skip to content

PHPCBF fails to fix code with heredoc/nowdoc as first argument to a function #1224

@sc0rp10

Description

@sc0rp10

Hi!
If the file contains code like:

<?php var_dump( <<<TEXT foo TEXT , 'bar' );

I got error:

$ ./vendor/bin/phpcbf --standard=PSR2 t.php -vvv --report=diff Changing into directory /tmp/t Processing t.php [PHP => 19 tokens in 9 lines]... DONE in 1ms (1 fixable violations) => Fixing file: 1/1 violations remaining [made 50 passes]... ERROR in 40ms No fixable errors were found Time: 72ms; Memory: 4Mb 
$ ./vendor/bin/phpcbf --version PHP_CodeSniffer version 2.7.0 (stable) by Squiz (http://www.squiz.net) 

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions