Skip to content

When I run phpcbf with stdin, the exit code is "1" instead of 0 #3367

Closed
@yaegassy

Description

@yaegassy

Describe the bug

In the case of stdin, the exit code always seems to be 1.

Is this behavior a bug?

Code sample

<?php

function dummy() {
    return "dummy";
}

Custom ruleset

None

To reproduce

$ phpcbf --version
PHP_CodeSniffer version 3.6.0 (stable) by Squiz (http://www.squiz.net)
$ cat sample.php
<?php
function dummy() {
    return "dummy";
}
$ cat sample.php | phpcbf
<?php

function dummy()
{
    return "dummy";
}
$ echo $?
1

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