It seems like $this->handler can also be of type boolean; however, parameter $stream of fwrite() does only seem to accept resource, maybe add an additional type check?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-type annotation
It seems like $this->handler can also be of type boolean; however, parameter $stream of feof() does only seem to accept resource, maybe add an additional type check?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-type annotation
57
while (! feof(/** @scrutinizer ignore-type */ $this->handler)) {
Loading history...
58
// Read buffer-size bytes
59
$content .= fread($this->handler, 4096); // read 4kb at a time
It seems like $this->handler can also be of type boolean; however, parameter $stream of fread() does only seem to accept resource, maybe add an additional type check?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-type annotation
59
$content .= fread(/** @scrutinizer ignore-type */ $this->handler, 4096); // read 4kb at a time
It seems like $this->handler can also be of type boolean; however, parameter $stream of fclose() does only seem to accept resource, maybe add an additional type check?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-type annotation