gajus / gajus/dindent

Allow using stdin

Open
#32 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
PHP
Stars
179
Forks
30
PR merge metrics
No merged PRs in 30d

Description

Your test `file_exists('php://stdin')` returns `FALSE`, and `file_get_contents` doesn’t work with `/dev/stdin` or `-`. I suggest that you

1. get rid of the check (`file_get_contents` will complain with a better message anyway if it can’t read the file), and
2. do `if ($options['input'] === '-') $options['input'] = 'php://stdin';` for a more natural command line interface

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.