Skip to content

Commit d3ce786

Browse files
committed
Improve docblocks
1 parent 52bf382 commit d3ce786

File tree

9 files changed

+70
-5
lines changed

9 files changed

+70
-5
lines changed

src/Encoding/ChunkStream.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ public function getWriteFilter()
2929
return 'dechunk';
3030
}
3131

32+
/**
33+
* {@inheritdoc}
34+
*/
3235
protected function fill()
3336
{
3437
parent::fill();

src/Encoding/CompressStream.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
*/
1212
class CompressStream extends FilteredStream
1313
{
14+
/**
15+
* @param StreamInterface $stream
16+
* @param int $level
17+
*/
1418
public function __construct(StreamInterface $stream, $level = -1)
1519
{
1620
if (!extension_loaded('zlib')) {
@@ -20,11 +24,17 @@ public function __construct(StreamInterface $stream, $level = -1)
2024
parent::__construct($stream, ['window' => 15, 'level' => $level], ['window' => 15]);
2125
}
2226

27+
/**
28+
* {@inheritdoc}
29+
*/
2330
public function getReadFilter()
2431
{
2532
return 'zlib.deflate';
2633
}
2734

35+
/**
36+
* {@inheritdoc}
37+
*/
2838
public function getWriteFilter()
2939
{
3040
return 'zlib.inflate';

src/Encoding/DecompressStream.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
*/
1212
class DecompressStream extends FilteredStream
1313
{
14+
/**
15+
* @param StreamInterface $stream
16+
* @param int $level
17+
*/
1418
public function __construct(StreamInterface $stream, $level = -1)
1519
{
1620
if (!extension_loaded('zlib')) {
@@ -20,11 +24,17 @@ public function __construct(StreamInterface $stream, $level = -1)
2024
parent::__construct($stream, ['window' => 15], ['window' => 15, 'level' => $level]);
2125
}
2226

27+
/**
28+
* {@inheritdoc}
29+
*/
2330
public function getReadFilter()
2431
{
2532
return 'zlib.inflate';
2633
}
2734

35+
/**
36+
* {@inheritdoc}
37+
*/
2838
public function getWriteFilter()
2939
{
3040
return 'zlib.deflate';

src/Encoding/DeflateStream.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,26 @@
1111
*/
1212
class DeflateStream extends FilteredStream
1313
{
14+
/**
15+
* @param StreamInterface $stream
16+
* @param int $level
17+
*/
1418
public function __construct(StreamInterface $stream, $level = -1)
1519
{
1620
parent::__construct($stream, ['window' => -15, 'level' => $level], ['window' => -15]);
1721
}
1822

23+
/**
24+
* {@inheritdoc}
25+
*/
1926
public function getReadFilter()
2027
{
2128
return 'zlib.deflate';
2229
}
2330

31+
/**
32+
* {@inheritdoc}
33+
*/
2434
public function getWriteFilter()
2535
{
2636
return 'zlib.inflate';

src/Encoding/Filter/Chunk.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,16 @@
22

33
namespace Http\Message\Encoding\Filter;
44

5+
/**
6+
* Userland implementation of the chunk stream filter.
7+
*
8+
* @author Joel Wurtz <joel.wurtz@gmail.com>
9+
*/
510
class Chunk extends \php_user_filter
611
{
12+
/**
13+
* {@inheritdoc}
14+
*/
715
public function filter($in, $out, &$consumed, $closing)
816
{
917
while ($bucket = stream_bucket_make_writeable($in)) {

src/Encoding/FilteredStream.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ abstract class FilteredStream implements StreamInterface
4646

4747
/**
4848
* @param StreamInterface $stream
49-
* @param null $readFilterOptions
50-
* @param null $writeFilterOptions
49+
* @param mixed|null $readFilterOptions
50+
* @param mixed|null $writeFilterOptions
5151
*/
5252
public function __construct(StreamInterface $stream, $readFilterOptions = null, $writeFilterOptions = null)
5353
{
@@ -128,16 +128,16 @@ public function getContents()
128128
}
129129

130130
/**
131-
* Return the read filter name.
131+
* Returns the read filter name.
132132
*
133133
* @return string
134134
*/
135135
abstract public function getReadFilter();
136136

137137
/**
138-
* Return the write filter name.
138+
* Returns the write filter name.
139139
*
140-
* @return mixed
140+
* @return string
141141
*/
142142
abstract public function getWriteFilter();
143143
}

src/Encoding/GzipDecodeStream.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
*/
1212
class GzipDecodeStream extends FilteredStream
1313
{
14+
/**
15+
* @param StreamInterface $stream
16+
* @param int $level
17+
*/
1418
public function __construct(StreamInterface $stream, $level = -1)
1519
{
1620
if (!extension_loaded('zlib')) {
@@ -20,11 +24,17 @@ public function __construct(StreamInterface $stream, $level = -1)
2024
parent::__construct($stream, ['window' => 31], ['window' => 31, 'level' => $level]);
2125
}
2226

27+
/**
28+
* {@inheritdoc}
29+
*/
2330
public function getReadFilter()
2431
{
2532
return 'zlib.inflate';
2633
}
2734

35+
/**
36+
* {@inheritdoc}
37+
*/
2838
public function getWriteFilter()
2939
{
3040
return 'zlib.deflate';

src/Encoding/GzipEncodeStream.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
*/
1212
class GzipEncodeStream extends FilteredStream
1313
{
14+
/**
15+
* @param StreamInterface $stream
16+
* @param int $level
17+
*/
1418
public function __construct(StreamInterface $stream, $level = -1)
1519
{
1620
if (!extension_loaded('zlib')) {

src/Encoding/InflateStream.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
*/
1212
class InflateStream extends FilteredStream
1313
{
14+
/**
15+
* @param StreamInterface $stream
16+
* @param int $level
17+
*/
1418
public function __construct(StreamInterface $stream, $level = -1)
1519
{
1620
if (!extension_loaded('zlib')) {
@@ -20,11 +24,17 @@ public function __construct(StreamInterface $stream, $level = -1)
2024
parent::__construct($stream, ['window' => -15], ['window' => -15, 'level' => $level]);
2125
}
2226

27+
/**
28+
* {@inheritdoc}
29+
*/
2330
public function getReadFilter()
2431
{
2532
return 'zlib.inflate';
2633
}
2734

35+
/**
36+
* {@inheritdoc}
37+
*/
2838
public function getWriteFilter()
2939
{
3040
return 'zlib.deflate';

0 commit comments

Comments
 (0)