Skip to content

Commit 145a903

Browse files
jakubboucekMartin Dostál
authored andcommitted
LazyStreamWriter - fix static analysis
1 parent 4394adb commit 145a903

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/IO/LazyStreamWriter.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ public function error(string $string): void
4848
fwrite($this->errorStream, $string);
4949
}
5050

51+
/**
52+
* @return resource
53+
*/
5154
private function createStream(callable $factory)
5255
{
5356
$stream = $factory();

src/IO/MemoryWriter.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class MemoryWriter implements IBufferWriter
1515
/** @var resource|null */
1616
private $errorStream;
1717

18-
/** @var FileWriter */
18+
/** @var LazyStreamWriter */
1919
private $writer;
2020

2121
public function __construct()
@@ -47,11 +47,17 @@ public function error(string $string): void
4747
$this->writer->error($string);
4848
}
4949

50+
/**
51+
* @return resource
52+
*/
5053
private function createOutputStream()
5154
{
5255
return $this->outputStream = $this->createMemoryStream();
5356
}
5457

58+
/**
59+
* @return resource
60+
*/
5561
private function createErrorStream()
5662
{
5763
return $this->errorStream = $this->createMemoryStream();

0 commit comments

Comments
 (0)