| @@ -51,8 +51,8 @@ discard block | ||
| 51 | 51 |      { | 
| 52 | 52 | $this->fileCrypt = new FileEncrypter($this->default_key); | 
| 53 | 53 | $this->test_file = $this->createTestFile(); | 
| 54 | - $this->test_encrypted_file = __DIR__ .'/test.enc'; | |
| 55 | - $this->test_decrypted_file = __DIR__ .'/test.dec.json'; | |
| 54 | + $this->test_encrypted_file = __DIR__ . '/test.enc'; | |
| 55 | + $this->test_decrypted_file = __DIR__ . '/test.dec.json'; | |
| 56 | 56 | } | 
| 57 | 57 | |
| 58 | 58 | protected function tearDown() | 
| @@ -117,7 +117,7 @@ discard block | ||
| 117 | 117 | |
| 118 | 118 | // Try testing with a non-existent source file | 
| 119 | 119 | $this->setExpectedException(EncryptException::class); | 
| 120 | - $this->fileCrypt->encrypt(__DIR__ .'/test.test', __DIR__ .'/test.test.enc'); | |
| 120 | + $this->fileCrypt->encrypt(__DIR__ . '/test.test', __DIR__ . '/test.test.enc'); | |
| 121 | 121 | } | 
| 122 | 122 | |
| 123 | 123 | /** | 
| @@ -153,7 +153,7 @@ discard block | ||
| 153 | 153 | $this->assertInstanceOf( | 
| 154 | 154 | DecryptException::class, | 
| 155 | 155 | $e, | 
| 156 | - 'Expected an instance of DecryptException containing a message about IV, got '. get_class($e) | |
| 156 | + 'Expected an instance of DecryptException containing a message about IV, got ' . get_class($e) | |
| 157 | 157 | ); | 
| 158 | 158 | } | 
| 159 | 159 | |
| @@ -171,7 +171,7 @@ discard block | ||
| 171 | 171 | $this->assertInstanceOf( | 
| 172 | 172 | DecryptException::class, | 
| 173 | 173 | $e, | 
| 174 | - 'Expected an instance of DecryptException with a message about the checksum, got '. get_class($e) | |
| 174 | + 'Expected an instance of DecryptException with a message about the checksum, got ' . get_class($e) | |
| 175 | 175 | ); | 
| 176 | 176 | } | 
| 177 | 177 | |
| @@ -189,7 +189,7 @@ discard block | ||
| 189 | 189 | $this->assertInstanceOf( | 
| 190 | 190 | DecryptException::class, | 
| 191 | 191 | $e, | 
| 192 | - 'Expected an instance of DecryptException with a message about the checksum, got '. get_class($e) | |
| 192 | + 'Expected an instance of DecryptException with a message about the checksum, got ' . get_class($e) | |
| 193 | 193 | ); | 
| 194 | 194 | } | 
| 195 | 195 | |
| @@ -208,7 +208,7 @@ discard block | ||
| 208 | 208 | $decrypted_data = ''; | 
| 209 | 209 | $this->fileCrypt->streamDecrypt( | 
| 210 | 210 | $encryptedFile, | 
| 211 | -            function ($data, $stream) use (&$decrypted_data, $encryptedFile) { | |
| 211 | +            function($data, $stream) use (&$decrypted_data, $encryptedFile) { | |
| 212 | 212 |                  if (feof($stream)) { | 
| 213 | 213 | $data = substr($data, 0, -$encryptedFile->getPadding()); | 
| 214 | 214 | } | 
| @@ -245,7 +245,7 @@ discard block | ||
| 245 | 245 | */ | 
| 246 | 246 | protected function createTestFile() | 
| 247 | 247 |      { | 
| 248 | - $file = __DIR__ .'/test.json'; | |
| 248 | + $file = __DIR__ . '/test.json'; | |
| 249 | 249 | |
| 250 | 250 | file_put_contents($file, json_encode(['unit' => 'test'])); | 
| 251 | 251 | return $file; | 
| @@ -54,7 +54,7 @@ discard block | ||
| 54 | 54 | /** | 
| 55 | 55 | * FileEncrypter constructor. | 
| 56 | 56 | * | 
| 57 | - * @param $key | |
| 57 | + * @param string $key | |
| 58 | 58 | */ | 
| 59 | 59 | public function __construct($key) | 
| 60 | 60 |      { | 
| @@ -313,7 +313,7 @@ discard block | ||
| 313 | 313 | |
| 314 | 314 | /** | 
| 315 | 315 | * Returns the options for the stream filter | 
| 316 | - * @param null $iv If no IV is set, one will be created | |
| 316 | + * @param string $iv If no IV is set, one will be created | |
| 317 | 317 | * | 
| 318 | 318 | * @return array Returns an array with 'mode','key' and 'iv' | 
| 319 | 319 | */ |