Skip to content
Permalink
Browse files

Ignore phpstan issue with STDOUT

  • Loading branch information...
bizurkur committed Apr 15, 2019
1 parent 2b9e841 commit 49799c290a1dabc2fdd33564dd7cef6519c676f1
Showing with 7 additions and 5 deletions.
  1. +4 −0 phpstan.neon.dist
  2. +3 −5 src/main/php/org/bovigo/vfs/visitor/vfsStreamPrintVisitor.php
@@ -7,3 +7,7 @@ parameters:
level: 4
paths:
- src/main
ignoreErrors:
-
message: '/Default value of the parameter #1 \$out \(mixed\) of method [a-zA-Z0-9\\_]+::__construct\(\) is incompatible with type resource/'
path: %currentWorkingDirectory%/src/main/php/org/bovigo/vfs/visitor/vfsStreamPrintVisitor.php
@@ -39,15 +39,13 @@ class vfsStreamPrintVisitor extends vfsStreamAbstractVisitor
*
* If no file pointer given it will fall back to STDOUT.
*
* @param resource|null $out optional
* @param resource $out optional
* @throws \InvalidArgumentException
* @api
*/
public function __construct($out = null)
public function __construct($out = STDOUT)
{
$out = $out ?? STDOUT;
if (is_resource($out) === false || get_resource_type($out) !== 'stream') {
if (!is_resource($out) || get_resource_type($out) !== 'stream') {
throw new \InvalidArgumentException('Given filepointer is not a resource of type stream');
}

0 comments on commit 49799c2

Please sign in to comment.
You can’t perform that action at this time.