@@ -41,7 +41,7 @@ |
||
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 | * |
@@ -57,7 +57,7 @@ |
||
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 | * |
@@ -57,7 +57,7 @@ |
||
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 | * |
@@ -45,7 +45,7 @@ |
||
45 | 45 | * @param LoggerInterface $logger |
46 | 46 | * @throws Exception An exception if an unknown storage is requested. |
47 | 47 | */ |
48 | - public static function getStorage($type="dummy", $options=array(), LoggerInterface $logger) |
|
48 | + public static function getStorage($type = "dummy", $options = array(), LoggerInterface $logger) |
|
49 | 49 | { |
50 | 50 | switch ($type) { |
51 | 51 | case "dummy": |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | private function getUserSecret($userId) |
89 | 89 | { |
90 | 90 | $sth = $this->handle->prepare("SELECT secret FROM ".$this->tableName." WHERE userid = ?"); |
91 | - if($sth->execute(array($userId))) { |
|
91 | + if ($sth->execute(array($userId))) { |
|
92 | 92 | $secret = $sth->fetchColumn(); |
93 | 93 | if ($secret !== false) { |
94 | 94 | return $secret; |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | } else { |
111 | 111 | $sth = $this->handle->prepare("INSERT INTO ".$this->tableName." (secret,userid) VALUES (?,?)"); |
112 | 112 | } |
113 | - $result = $sth->execute(array($secret,$userId)); |
|
113 | + $result = $sth->execute(array($secret, $userId)); |
|
114 | 114 | if (!$result) { |
115 | 115 | $this->logger->error('Unable to persist user secret in user secret storage (PDO)'); |
116 | 116 | } |
@@ -41,7 +41,7 @@ |
||
41 | 41 | * |
42 | 42 | * @throws Exception An exception if an unknown user storage is requested. |
43 | 43 | */ |
44 | - public static function getStorage($type="file", $options=array(), LoggerInterface $logger) |
|
44 | + public static function getStorage($type = "file", $options = array(), LoggerInterface $logger) |
|
45 | 45 | { |
46 | 46 | switch ($type) { |
47 | 47 | case "file": |
@@ -39,7 +39,7 @@ |
||
39 | 39 | * @return Tiqr_OcraService_Interface |
40 | 40 | * @throws Exception An exception if an unknown orca service type is requested. |
41 | 41 | */ |
42 | - public static function getOcraService($type="tiqr", $options=array(), LoggerInterface $logger) |
|
42 | + public static function getOcraService($type = "tiqr", $options = array(), LoggerInterface $logger) |
|
43 | 43 | { |
44 | 44 | switch ($type) { |
45 | 45 | case "tiqr": |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | * @throws RuntimeException When the options configuration array misses a required parameter |
48 | 48 | * |
49 | 49 | */ |
50 | - public static function getStorage($type="file", $options=array(), LoggerInterface $logger) |
|
50 | + public static function getStorage($type = "file", $options = array(), LoggerInterface $logger) |
|
51 | 51 | { |
52 | 52 | switch ($type) { |
53 | 53 | case "file": |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | } |
76 | 76 | } |
77 | 77 | |
78 | - $pdoInstance = new PDO($options['dsn'],$options['username'],$options['password']); |
|
78 | + $pdoInstance = new PDO($options['dsn'], $options['username'], $options['password']); |
|
79 | 79 | // Set a hard-coded default for the probability the expired state is removed |
80 | 80 | // 0.1 translates to a 10% chance the garbage collection is executed |
81 | 81 | $cleanupProbability = 0.1; |
@@ -23,7 +23,7 @@ |
||
23 | 23 | * @param mixed $value The data to store in state storage |
24 | 24 | * @param int $expire The expiration (in seconds) of the data |
25 | 25 | */ |
26 | - public function setValue($key, $value, $expire=0); |
|
26 | + public function setValue($key, $value, $expire = 0); |
|
27 | 27 | |
28 | 28 | /** |
29 | 29 | * Remove a value from the state storage |