Passed
Push — master ( d89e8d...587fc0 )
by Pieter van der
13:14
created
library/tiqr/Tiqr/UserStorage/FileTrait.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@
 block discarded – undo
74 74
      */
75 75
     public function getPath(): string
76 76
     {
77
-        if (substr($this->path, -1)!="/") return $this->path."/";
77
+        if (substr($this->path, -1) != "/") return $this->path."/";
78 78
         return $this->path;
79 79
     }
80 80
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -74,7 +74,9 @@
 block discarded – undo
74 74
      */
75 75
     public function getPath(): string
76 76
     {
77
-        if (substr($this->path, -1)!="/") return $this->path."/";
77
+        if (substr($this->path, -1)!="/") {
78
+            return $this->path."/";
79
+        }
78 80
         return $this->path;
79 81
     }
80 82
 
Please login to merge, or discard this patch.
library/tiqr/Tiqr/UserSecretStorage/File.php 2 patches
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,6 @@
 block discarded – undo
32 32
  * Supported options:
33 33
  * path : Path to the directory where the user data is stored
34 34
  *
35
-
36 35
  */
37 36
 class Tiqr_UserSecretStorage_File  extends Tiqr_UserSecretStorage_Abstract
38 37
 {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@
 block discarded – undo
80 80
      */
81 81
     protected function setUserSecret(string $userId, string $secret): void
82 82
     {
83
-        $data=array();
83
+        $data = array();
84 84
         if ($this->_userExists($userId)) {
85 85
             $data = $this->_loadUser($userId);
86 86
         }
Please login to merge, or discard this patch.
library/tiqr/Tiqr/UserSecretStorage/Abstract.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -57,13 +57,13 @@  discard block
 block discarded – undo
57 57
         if ($prefix === $this->encryption->get_type()) {
58 58
             // Decrypt the secret if it is prefixed with the current encryption type
59 59
             // Remove the encryption type prefix before decrypting
60
-            return $this->encryption->decrypt( substr($encryptedSecret, $pos+1) );
60
+            return $this->encryption->decrypt(substr($encryptedSecret, $pos + 1));
61 61
         }
62 62
 
63 63
         // Check the decryption array for the encryption type to see if there is an encryption
64 64
         // instance defined for it. If so, use that to decrypt the secret.
65 65
         if (isset($this->decryption[$prefix])) {
66
-            return $this->decryption[$prefix]->decrypt( substr($encryptedSecret, $pos+1) );
66
+            return $this->decryption[$prefix]->decrypt(substr($encryptedSecret, $pos + 1));
67 67
         }
68 68
 
69 69
         $this->logger->error("Secret for user '$userId' is encrypted with unsupported encryption type '$prefix'");
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
     {
81 81
         $encryptedSecret = $this->encryption->encrypt($secret);
82 82
         // Prefix the user secret with the encryption type
83
-        $this->setUserSecret($userId, $this->encryption->get_type() . ':' . $encryptedSecret);
83
+        $this->setUserSecret($userId, $this->encryption->get_type().':'.$encryptedSecret);
84 84
     }
85 85
 
86 86
     /**
@@ -88,6 +88,6 @@  discard block
 block discarded – undo
88 88
      */
89 89
     public function healthCheck(string &$statusMessage = ''): bool
90 90
     {
91
-        return true;    // Health check is always successful when not implemented
91
+        return true; // Health check is always successful when not implemented
92 92
     }
93 93
 }
Please login to merge, or discard this patch.
library/tiqr/Tiqr/UserStorage/Abstract.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,6 +71,6 @@
 block discarded – undo
71 71
      */
72 72
     public function healthCheck(string &$statusMessage = ''): bool
73 73
     {
74
-        return true;    // Health check is always successful when not implemented
74
+        return true; // Health check is always successful when not implemented
75 75
     }
76 76
 }
Please login to merge, or discard this patch.