@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | * (non-PHPdoc) |
| 46 | 46 | * @see library/tiqr/Tiqr/StateStorage/Tiqr_StateStorage_Abstract::setValue() |
| 47 | 47 | */ |
| 48 | - public function setValue($key, $value, $expire=0) |
|
| 48 | + public function setValue($key, $value, $expire = 0) |
|
| 49 | 49 | { |
| 50 | 50 | if ($this->keyExists($key)) { |
| 51 | 51 | $sth = $this->handle->prepare("UPDATE ".$this->tablename." SET `value` = ?, `expire` = ? WHERE `key` = ?"); |
@@ -54,9 +54,9 @@ discard block |
||
| 54 | 54 | } |
| 55 | 55 | // $expire == 0 means never expire |
| 56 | 56 | if ($expire != 0) { |
| 57 | - $expire+=time(); // Store unix timestamp after which the expires |
|
| 57 | + $expire += time(); // Store unix timestamp after which the expires |
|
| 58 | 58 | } |
| 59 | - $res = $sth->execute(array(serialize($value),$expire,$key)); |
|
| 59 | + $res = $sth->execute(array(serialize($value), $expire, $key)); |
|
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | /** |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | if (false === $sth) { |
| 84 | 84 | return NULL; |
| 85 | 85 | } |
| 86 | - if (false === $sth->execute(array($key, time())) ) { |
|
| 86 | + if (false === $sth->execute(array($key, time()))) { |
|
| 87 | 87 | return NULL; |
| 88 | 88 | } |
| 89 | 89 | $result = $sth->fetchColumn(); |
@@ -92,10 +92,10 @@ discard block |
||
| 92 | 92 | return NULL; |
| 93 | 93 | } |
| 94 | 94 | |
| 95 | - public function __construct($config=array()) |
|
| 95 | + public function __construct($config = array()) |
|
| 96 | 96 | { |
| 97 | 97 | $this->tablename = $config['table']; |
| 98 | - $this->handle = new PDO($config['dsn'],$config['username'],$config['password']); |
|
| 98 | + $this->handle = new PDO($config['dsn'], $config['username'], $config['password']); |
|
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | } |