Passed
Push — develop ( 6fb9ed...4c8ea7 )
by Pieter van der
01:18 queued 14s
created
library/tiqr/Tiqr/Random.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
     public static function randomBytes($length)
40 40
     {
41 41
         // Get $length cryptographically secure pseudo-random bytes
42
-        $rnd=\random_bytes($length);
42
+        $rnd = \random_bytes($length);
43 43
 
44 44
         if (strlen($rnd) !== $length) {
45 45
             throw new Exception("random_bytes did not return the requested number of bytes");
Please login to merge, or discard this patch.
library/tiqr/Tiqr/DeviceStorage/TokenExchange.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -41,15 +41,15 @@
 block discarded – undo
41 41
     {
42 42
         $url = $this->_options["url"]."?appId=".$this->_options["appid"];
43 43
         
44
-        $url.= "&notificationToken=".$notificationToken;
44
+        $url .= "&notificationToken=".$notificationToken;
45 45
         
46 46
         $output = file_get_contents($url);
47
-        if (stripos($output, "not found")!==false) {
47
+        if (stripos($output, "not found") !== false) {
48 48
             $this->logger->error('Token Exchange failed and responded with: not found', ['full output' => $output]);
49 49
             return false;
50 50
         }
51 51
 
52
-        if (stripos($output, "error")!==false) {
52
+        if (stripos($output, "error") !== false) {
53 53
             $this->logger->error('Token Exchange failed and responded with: error', ['full output' => $output]);
54 54
             return false;
55 55
         }
Please login to merge, or discard this patch.
library/tiqr/Tiqr/DeviceStorage/Abstract.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
      * the Tiqr_DeviceStorage factory will call this for you.
59 59
      * @param array $options The options for the s
60 60
      */
61
-    public function __construct($options=array(), LoggerInterface $logger)
61
+    public function __construct($options = array(), LoggerInterface $logger)
62 62
     {
63 63
         $this->_options = $options;
64 64
         $this->logger = $logger;
Please login to merge, or discard this patch.
library/tiqr/Tiqr/StateStorage/Memcache.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
      * The default configuration
52 52
      */
53 53
     const DEFAULT_HOST = '127.0.0.1';
54
-    const DEFAULT_PORT =  11211;
54
+    const DEFAULT_PORT = 11211;
55 55
     
56 56
     /**
57 57
      * Get the prefix to use for all keys in memcache.
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
      * (non-PHPdoc)
103 103
      * @see library/tiqr/Tiqr/StateStorage/Tiqr_StateStorage_Abstract::setValue()
104 104
      */
105
-    public function setValue($key, $value, $expire=0)
105
+    public function setValue($key, $value, $expire = 0)
106 106
     {  
107 107
         $key = $this->_getKeyPrefix().$key;
108 108
 
Please login to merge, or discard this patch.
library/tiqr/Tiqr/UserStorage/Encryption.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
      *
41 41
      * @return Tiqr_UserStorage_Encryption_Interface
42 42
      */
43
-    public static function getEncryption(LoggerInterface $logger, $type="dummy", $options=array())
43
+    public static function getEncryption(LoggerInterface $logger, $type = "dummy", $options = array())
44 44
     {
45 45
         $logger->info(sprintf('Using %s as UserStorage encryption type', $type));
46 46
         switch ($type) {
Please login to merge, or discard this patch.
library/tiqr/Tiqr/UserStorage/FileTrait.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 
32 32
         if ($data === NULL) {
33 33
             if ($failIfNotFound) {
34
-                throw new Exception('Error loading data for user: ' . var_export($userId, TRUE));
34
+                throw new Exception('Error loading data for user: '.var_export($userId, TRUE));
35 35
             } else {
36 36
                 $this->logger->error('Error loading data for user from user storage (file storage)');
37 37
                 return false;
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
      */
48 48
     public function getPath()
49 49
     {
50
-        if (substr($this->path, -1)!="/") return $this->path."/";
50
+        if (substr($this->path, -1) != "/") return $this->path."/";
51 51
         return $this->path;
52 52
     }
53 53
 }
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,9 @@
 block discarded – undo
47 47
      */
48 48
     public function getPath()
49 49
     {
50
-        if (substr($this->path, -1)!="/") return $this->path."/";
50
+        if (substr($this->path, -1)!="/") {
51
+            return $this->path."/";
52
+        }
51 53
         return $this->path;
52 54
     }
53 55
 }
Please login to merge, or discard this patch.
library/tiqr/Tiqr/UserSecretStorage/Encryption/Interface.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
     public function encrypt($data);
42 42
     
43 43
     /**
44
-      * Decrypts the given data.
44
+     * Decrypts the given data.
45 45
      *
46 46
      * @param String $data Data to decrypt.
47 47
      *
Please login to merge, or discard this patch.
library/tiqr/Tiqr/UserSecretStorage/Encryption/Mcrypt.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
     }
58 58
     
59 59
     /**
60
-      * Decrypts the given data.
60
+     * Decrypts the given data.
61 61
      *
62 62
      * @param String $data Data to decrypt.
63 63
      *
Please login to merge, or discard this patch.
library/tiqr/Tiqr/UserSecretStorage/Encryption/Dummy.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
     }
58 58
     
59 59
     /**
60
-      * Decrypts the given data.
60
+     * Decrypts the given data.
61 61
      *
62 62
      * @param String $data Data to decrypt.
63 63
      *
Please login to merge, or discard this patch.