| Total Complexity | 15 |
| Total Lines | 125 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | trait StreamDecorator |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * @var StreamInterface |
||
| 16 | */ |
||
| 17 | protected $stream; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * {@inheritdoc} |
||
| 21 | */ |
||
| 22 | 1 | public function __toString() |
|
| 23 | { |
||
| 24 | 1 | return $this->stream->__toString(); |
|
| 25 | } |
||
| 26 | |||
| 27 | /** |
||
| 28 | * {@inheritdoc} |
||
| 29 | */ |
||
| 30 | 1 | public function close() |
|
| 31 | { |
||
| 32 | 1 | $this->stream->close(); |
|
| 33 | 1 | } |
|
| 34 | |||
| 35 | /** |
||
| 36 | * {@inheritdoc} |
||
| 37 | */ |
||
| 38 | 1 | public function detach() |
|
| 39 | { |
||
| 40 | 1 | return $this->stream->detach(); |
|
| 41 | } |
||
| 42 | |||
| 43 | /** |
||
| 44 | * {@inheritdoc} |
||
| 45 | */ |
||
| 46 | 1 | public function getSize() |
|
| 47 | { |
||
| 48 | 1 | return $this->stream->getSize(); |
|
| 49 | } |
||
| 50 | |||
| 51 | /** |
||
| 52 | * {@inheritdoc} |
||
| 53 | */ |
||
| 54 | 1 | public function tell() |
|
| 55 | { |
||
| 56 | 1 | return $this->stream->tell(); |
|
| 57 | } |
||
| 58 | |||
| 59 | /** |
||
| 60 | * {@inheritdoc} |
||
| 61 | */ |
||
| 62 | 1 | public function eof() |
|
| 65 | } |
||
| 66 | |||
| 67 | /** |
||
| 68 | * {@inheritdoc} |
||
| 69 | */ |
||
| 70 | 1 | public function isSeekable() |
|
| 71 | { |
||
| 72 | 1 | return $this->stream->isSeekable(); |
|
| 73 | } |
||
| 74 | |||
| 75 | /** |
||
| 76 | * {@inheritdoc} |
||
| 77 | */ |
||
| 78 | 1 | public function seek($offset, $whence = SEEK_SET) |
|
| 79 | { |
||
| 80 | 1 | $this->stream->seek($offset, $whence); |
|
| 81 | 1 | } |
|
| 82 | |||
| 83 | /** |
||
| 84 | * {@inheritdoc} |
||
| 85 | */ |
||
| 86 | 1 | public function rewind() |
|
| 87 | { |
||
| 88 | 1 | $this->stream->rewind(); |
|
| 89 | 1 | } |
|
| 90 | |||
| 91 | /** |
||
| 92 | * {@inheritdoc} |
||
| 93 | */ |
||
| 94 | 1 | public function isWritable() |
|
| 95 | { |
||
| 96 | 1 | return $this->stream->isWritable(); |
|
| 97 | } |
||
| 98 | |||
| 99 | /** |
||
| 100 | * {@inheritdoc} |
||
| 101 | */ |
||
| 102 | 1 | public function write($string) |
|
| 103 | { |
||
| 104 | 1 | return $this->stream->write($string); |
|
| 105 | } |
||
| 106 | |||
| 107 | /** |
||
| 108 | * {@inheritdoc} |
||
| 109 | */ |
||
| 110 | 1 | public function isReadable() |
|
| 111 | { |
||
| 112 | 1 | return $this->stream->isReadable(); |
|
| 113 | } |
||
| 114 | |||
| 115 | /** |
||
| 116 | * {@inheritdoc} |
||
| 117 | */ |
||
| 118 | 1 | public function read($length) |
|
| 121 | } |
||
| 122 | |||
| 123 | /** |
||
| 124 | * {@inheritdoc} |
||
| 125 | */ |
||
| 126 | 1 | public function getContents() |
|
| 129 | } |
||
| 130 | |||
| 131 | /** |
||
| 132 | * {@inheritdoc} |
||
| 133 | */ |
||
| 134 | 1 | public function getMetadata($key = null) |
|
| 137 | } |
||
| 138 | } |
||
| 139 |