Passed
Pull Request — develop (#24)
by Michiel
06:58
created
library/tiqr/Tiqr/StateStorage/Memcache.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -130,8 +130,9 @@
 block discarded – undo
130 130
         $key = $this->_getKeyPrefix().$key;
131 131
 
132 132
         $result = $this->_memcache->get($key);
133
-        if( $result === false )
134
-            return null;
133
+        if( $result === false ) {
134
+                    return null;
135
+        }
135 136
         return $result;
136 137
     }
137 138
         
Please login to merge, or discard this patch.
library/tiqr/Tiqr/StateStorage/File.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -39,8 +39,8 @@  discard block
 block discarded – undo
39 39
     public function setValue($key, $value, $expire=0)
40 40
     {   
41 41
         $envelope = array("expire"=>$expire,
42
-                          "createdAt"=>time(),
43
-                          "value"=>$value);
42
+                            "createdAt"=>time(),
43
+                            "value"=>$value);
44 44
         $filename = $this->_stateFilename($key);
45 45
         
46 46
         file_put_contents($filename, serialize($envelope));
@@ -70,11 +70,11 @@  discard block
 block discarded – undo
70 70
         if (file_exists($filename)) {
71 71
             $envelope = unserialize(file_get_contents($filename));
72 72
             if ($envelope["expire"]!=0) {
73
-                 // This data is time-limited. If it's too old we discard it.
74
-                 if (time()-$envelope["createdAt"] > $envelope["expire"]) {
75
-                     $this->unsetValue($key); 
76
-                     return NULL;
77
-                 }
73
+                    // This data is time-limited. If it's too old we discard it.
74
+                    if (time()-$envelope["createdAt"] > $envelope["expire"]) {
75
+                        $this->unsetValue($key); 
76
+                        return NULL;
77
+                    }
78 78
             }
79 79
             return $envelope["value"];
80 80
         }
Please login to merge, or discard this patch.
library/tiqr/Tiqr/UserStorage/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/UserStorage/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/UserStorage/Abstract.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
     protected $_userSecretStorage;
36 36
 
37 37
     /**
38
-      * Constructor.
38
+     * Constructor.
39 39
      */
40 40
     public function __construct($config, $secretconfig = array())
41 41
     {
Please login to merge, or discard this patch.
library/tiqr/Tiqr/UserStorage/Ldap.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -127,7 +127,7 @@
 block discarded – undo
127 127
      */
128 128
     public function __construct($config, $secretconfig = array())
129 129
     {
130
-	    parent::__construct($config, $secretconfig);
130
+        parent::__construct($config, $secretconfig);
131 131
 
132 132
         $this->_userClass = isset($config['userClass']) ? $config['userClass'] : "tiqrPerson";
133 133
         $this->_dnPattern = isset($config['dnPattern']) ? $config['dnPattern'] : "%s";        
Please login to merge, or discard this patch.
library/tiqr/Tiqr/UserStorage/GenericStore.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
     public function createUser($userId, $displayName) 
44 44
     {
45 45
         $user = array("userId"=>$userId,
46
-                      "displayName"=>$displayName);
46
+                        "displayName"=>$displayName);
47 47
         return $this->_saveUser($userId, $user);
48 48
     }
49 49
 
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
     {
78 78
         if ($data = $this->_loadUser($userId)) {
79 79
             if (isset($data["notificationType"])) {
80
-               return $data["notificationType"];
80
+                return $data["notificationType"];
81 81
             }
82 82
         }
83 83
         return NULL;
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
     {
103 103
         if ($data = $this->_loadUser($userId)) {
104 104
             if (isset($data["notificationAddress"])) {
105
-               return $data["notificationAddress"];
105
+                return $data["notificationAddress"];
106 106
             }
107 107
         }
108 108
         return NULL;
Please login to merge, or discard this patch.
library/tiqr/Tiqr/UserStorage/File.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -94,8 +94,8 @@
 block discarded – undo
94 94
      */
95 95
     public function getPath()
96 96
     {
97
-         if (substr($this->_path, -1)!="/") return $this->_path."/";
98
-         return $this->_path;
97
+            if (substr($this->_path, -1)!="/") return $this->_path."/";
98
+            return $this->_path;
99 99
     }
100 100
     
101 101
 }
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -94,7 +94,9 @@
 block discarded – undo
94 94
      */
95 95
     public function getPath()
96 96
     {
97
-         if (substr($this->_path, -1)!="/") return $this->_path."/";
97
+         if (substr($this->_path, -1)!="/") {
98
+             return $this->_path."/";
99
+         }
98 100
          return $this->_path;
99 101
     }
100 102
     
Please login to merge, or discard this patch.
library/tiqr/Tiqr/DeviceStorage/TokenExchange.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,8 +44,12 @@
 block discarded – undo
44 44
         $url.= "&notificationToken=".$notificationToken;
45 45
         
46 46
         $output = file_get_contents($url);
47
-        if (stripos($output, "not found")!==false) return false;
48
-        if (stripos($output, "error")!==false) return false;
47
+        if (stripos($output, "not found")!==false) {
48
+            return false;
49
+        }
50
+        if (stripos($output, "error")!==false) {
51
+            return false;
52
+        }
49 53
         return trim($output);
50 54
     }
51 55
 }
52 56
\ No newline at end of file
Please login to merge, or discard this patch.