| @@ -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()) { |
| 60 | 60 | // PKCS7 padding requires that between 1 and self::BLOCK_SIZE be |
| @@ -64,13 +64,13 @@ | ||
| 64 | 64 | return null; |
| 65 | 65 | } |
| 66 | 66 | return $plainTextSize; |
| 67 | 67 | } |
| 68 | - public function isWritable() | |
| 68 | + public function isWritable() : bool | |
| 69 | 69 | { |
| 70 | 70 | return \false; |
| 71 | 71 | } |
| 72 | - public function read($length) | |
| 72 | + public function read($length) : string | |
| 73 | 73 | { |
| 74 | 74 | if ($length > \strlen($this->buffer)) { |
| 75 | 75 | $this->buffer .= $this->decryptBlock((int) (self::BLOCK_SIZE * \ceil(($length - \strlen($this->buffer)) / self::BLOCK_SIZE))); |
| 76 | 76 | } |
| @@ -77,9 +77,9 @@ | ||
| 77 | 77 | $data = \substr($this->buffer, 0, $length); |
| 78 | 78 | $this->buffer = \substr($this->buffer, $length); |
| 79 | 79 | return $data ? $data : ''; |
| 80 | 80 | } |
| 81 | - public function seek($offset, $whence = \SEEK_SET) | |
| 81 | + public function seek($offset, $whence = \SEEK_SET) : void | |
| 82 | 82 | { |
| 83 | 83 | if ($offset === 0 && $whence === \SEEK_SET) { |
| 84 | 84 | $this->buffer = ''; |
| 85 | 85 | $this->cipherMethod->seek(0, \SEEK_SET); |