| @@ -52,9 +52,9 @@ | ||
| 52 | 52 | public function getCurrentIv() |
| 53 | 53 | { |
| 54 | 54 | return $this->cipherMethod->getCurrentIv(); |
| 55 | 55 | } |
| 56 | - public function getSize() | |
| 56 | + public function getSize() : ?int | |
| 57 | 57 | { |
| 58 | 58 | $plainTextSize = $this->stream->getSize(); |
| 59 | 59 | if ($this->cipherMethod->requiresPadding() && $plainTextSize !== null) { |
| 60 | 60 | // PKCS7 padding requires that between 1 and self::BLOCK_SIZE be |
| @@ -63,13 +63,13 @@ | ||
| 63 | 63 | return $plainTextSize + $padding; |
| 64 | 64 | } |
| 65 | 65 | return $plainTextSize; |
| 66 | 66 | } |
| 67 | - public function isWritable() | |
| 67 | + public function isWritable() : bool | |
| 68 | 68 | { |
| 69 | 69 | return \false; |
| 70 | 70 | } |
| 71 | - public function read($length) | |
| 71 | + public function read($length) : string | |
| 72 | 72 | { |
| 73 | 73 | if ($length > \strlen($this->buffer)) { |
| 74 | 74 | $this->buffer .= $this->encryptBlock((int) self::BLOCK_SIZE * \ceil(($length - \strlen($this->buffer)) / self::BLOCK_SIZE)); |
| 75 | 75 | } |
| @@ -76,9 +76,9 @@ | ||
| 76 | 76 | $data = \substr($this->buffer, 0, $length); |
| 77 | 77 | $this->buffer = \substr($this->buffer, $length); |
| 78 | 78 | return $data ? $data : ''; |
| 79 | 79 | } |
| 80 | - public function seek($offset, $whence = \SEEK_SET) | |
| 80 | + public function seek($offset, $whence = \SEEK_SET) : void | |
| 81 | 81 | { |
| 82 | 82 | if ($whence === \SEEK_CUR) { |
| 83 | 83 | $offset = $this->tell() + $offset; |
| 84 | 84 | $whence = \SEEK_SET; |