php-cli icon indicating copy to clipboard operation
php-cli copied to clipboard

Add development tools

Open pattisahusiwa opened this issue 4 years ago • 5 comments

It would be nice if you can add coding style and static analyzer? I've checked this repo with PHPStan and found at least 68 errors.

pattisahusiwa avatar Oct 04 '20 05:10 pattisahusiwa

sure thing, please contrib. thanks

adhocore avatar Oct 04 '20 05:10 adhocore

Unit tests failed after adding declare(strict_types=1) to all PHP files. Can you add the directive and fix the code?

Also please check this issue https://github.com/phpstan/phpstan/issues/3916#issue-714277268

pattisahusiwa avatar Oct 04 '20 11:10 pattisahusiwa

https://github.com/phpstan/phpstan/issues/3916#issuecomment-703231243

ohh, however in practice this is not infinite loop - maybe the php docs is misleading. the tests are working great and as expected with the code we have. i think this specific file can be blacklisted/ignored?

adhocore avatar Oct 06 '20 00:10 adhocore

how about

while (($bucket = stream_bucket_make_writeable($in)) && $bucket->data !== '') {
    static::$buffer .= $bucket->data;
}

adhocore avatar Oct 06 '20 00:10 adhocore

It's ok, we can ignore the error.

I'll working on phpstan integration, but we need to collaborate on the PR. What do you think?

pattisahusiwa avatar Oct 06 '20 09:10 pattisahusiwa

@pattisahusiwa not sure if we need to close this ticket due to lack of activity :D

adhocore avatar Jun 26 '23 09:06 adhocore