@@ -33,6 +33,7 @@ |
||
| 33 | 33 | /** |
| 34 | 34 | * @param Handler $handler |
| 35 | 35 | * @param non-empty-array<int, Middleware> $middlewares |
| 36 | + * @param Middleware[] $middlewares |
|
| 36 | 37 | */ |
| 37 | 38 | private function __construct($handler, $middlewares) |
| 38 | 39 | { |
@@ -30,6 +30,10 @@ |
||
| 30 | 30 | /** @var BufferUnpacker */ |
| 31 | 31 | private $unpacker; |
| 32 | 32 | |
| 33 | + /** |
|
| 34 | + * @param Packer $packer |
|
| 35 | + * @param BufferUnpacker $unpacker |
|
| 36 | + */ |
|
| 33 | 37 | public function __construct(?Packer $packer = null, ?BufferUnpacker $unpacker = null) |
| 34 | 38 | { |
| 35 | 39 | $this->packer = $packer ?: new Packer(PackOptions::FORCE_STR); |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | |
| 90 | 90 | /** |
| 91 | 91 | * @psalm-param non-empty-array<int, mixed> $key |
| 92 | - * @param int|string $index |
|
| 92 | + * @param integer $index |
|
| 93 | 93 | */ |
| 94 | 94 | public function update(array $key, Operations $operations, $index = 0) : array |
| 95 | 95 | { |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | |
| 115 | 115 | /** |
| 116 | 116 | * @psalm-param non-empty-array<int, mixed> $key |
| 117 | - * @param int|string $index |
|
| 117 | + * @param integer $index |
|
| 118 | 118 | */ |
| 119 | 119 | public function delete(array $key, $index = 0) : array |
| 120 | 120 | { |
@@ -104,6 +104,9 @@ |
||
| 104 | 104 | return $connection; |
| 105 | 105 | } |
| 106 | 106 | |
| 107 | + /** |
|
| 108 | + * @return resource |
|
| 109 | + */ |
|
| 107 | 110 | final public static function getRawStream(StreamConnection $connection) |
| 108 | 111 | { |
| 109 | 112 | $prop = (new \ReflectionObject($connection))->getProperty('stream'); |
@@ -52,6 +52,9 @@ discard block |
||
| 52 | 52 | )); |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | + /** |
|
| 56 | + * @param \PHPUnit\Framework\MockObject\MockObject $packer |
|
| 57 | + */ |
|
| 55 | 58 | public static function fromOptions(array $options, ?Packer $packer = null) : self |
| 56 | 59 | { |
| 57 | 60 | $connectionOptions = []; |
@@ -81,6 +84,9 @@ discard block |
||
| 81 | 84 | return new self($handler); |
| 82 | 85 | } |
| 83 | 86 | |
| 87 | + /** |
|
| 88 | + * @param \PHPUnit\Framework\MockObject\MockObject $packer |
|
| 89 | + */ |
|
| 84 | 90 | public static function fromDsn(string $dsn, ?Packer $packer = null) : self |
| 85 | 91 | { |
| 86 | 92 | $dsn = Dsn::parse($dsn); |
@@ -26,6 +26,7 @@ |
||
| 26 | 26 | |
| 27 | 27 | /** |
| 28 | 28 | * @param \Closure(Error, RequestFailed) : \Exception $factory |
| 29 | + * @param \Closure $factory |
|
| 29 | 30 | */ |
| 30 | 31 | private function __construct($factory) |
| 31 | 32 | { |