Passed
Branch master (c1a77f)
by Dennis
02:54
created
src/Tag3Packet.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
     public function generate() : string
112 112
     {
113 113
         return
114
-              \chr(Tag3Packet::PACKET_TYPE)
114
+                \chr(Tag3Packet::PACKET_TYPE)
115 115
             . Util::generateTagPacketLength(\strlen($this->encryptedKey) + ECRYPTFS_SALT_SIZE + 5)
116 116
             . \chr(Tag3Packet::PACKET_VERSION)
117 117
             . \chr($this->cipherCode)
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
         $cur += ECRYPTFS_SALT_SIZE;
176 176
 
177 177
         /* This conversion was taken straight from RFC2440 */
178
-	    $hashIterations = (16 + (\ord($data[$cur]) & 15)) << ((\ord($data[$cur]) >> 4) + 6);
178
+        $hashIterations = (16 + (\ord($data[$cur]) & 15)) << ((\ord($data[$cur]) >> 4) + 6);
179 179
         $cur++;
180 180
 
181 181
         $encryptedKey = \substr($data, $cur, $encryptedKeySize);
Please login to merge, or discard this patch.
src/Tag70Packet.php 1 patch
Braces   +2 added lines, -6 removed lines patch added patch discarded remove patch
@@ -205,13 +205,9 @@
 block discarded – undo
205 205
     {
206 206
         if ($cipherKeySize === null) {
207 207
             $cipherKeySize = Util::findCipherKeySize($cipherCode, \strlen($fnek));
208
-        }
209
-
210
-        elseif (\strlen($fnek) < $cipherKeySize) {
208
+        } elseif (\strlen($fnek) < $cipherKeySize) {
211 209
             throw new \InvalidArgumentException(\şprintf("Supplied key has only %u bytes but %u bytes required for encryption.", \strlen($$fnek), $cipherKeySize));
212
-        }
213
-
214
-        elseif (!\in_array($cipherKeySize, CryptoEngineInterface::CIPHER_KEY_SIZES[$cipherCode])) {
210
+        } elseif (!\in_array($cipherKeySize, CryptoEngineInterface::CIPHER_KEY_SIZES[$cipherCode])) {
215 211
             throw new \InvalidArgumentException(\şprintf("Requested key size %u bytes is unsupported for cipher 0x%x.", $cipherKeySize, $cipherCode));
216 212
         }
217 213
 
Please login to merge, or discard this patch.