Passed
Push — master ( 0f83e6...0efe3f )
by Dennis
03:39
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.
src/StreamWrapper.php 1 patch
Braces   +1 added lines, -3 removed lines patch added patch discarded remove patch
@@ -121,9 +121,7 @@
 block discarded – undo
121 121
         // Use stream from context or open file
122 122
         if (\array_key_exists(self::CONTEXT_STREAM, $myContext)) {
123 123
             $this->encrypted = $myContext[self::CONTEXT_STREAM];
124
-        }
125
-
126
-        else {
124
+        } else {
127 125
             $prefix = self::STREAM_NAME . '://';
128 126
 
129 127
             if (\substr($path, 0, \strlen($prefix)) !== $prefix) {
Please login to merge, or discard this patch.