@@ -14,15 +14,15 @@ |
||
| 14 | 14 | $this->cacheStorage = new NullStorage(); |
| 15 | 15 | } |
| 16 | 16 | |
| 17 | - public function testSet(){ |
|
| 17 | + public function testSet() { |
|
| 18 | 18 | $this->assertEquals($this->cacheStorage->set('key', 'value', 10), false); |
| 19 | 19 | } |
| 20 | 20 | |
| 21 | - public function testGet(){ |
|
| 21 | + public function testGet() { |
|
| 22 | 22 | $this->assertEquals($this->cacheStorage->get('key'), false); |
| 23 | 23 | } |
| 24 | 24 | |
| 25 | - public function testDelete(){ |
|
| 25 | + public function testDelete() { |
|
| 26 | 26 | $this->assertEquals($this->cacheStorage->delete('key'), false); |
| 27 | 27 | } |
| 28 | 28 | |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | $this->memcacheMock = $this->getMockBuilder('\Memcached') |
| 23 | 23 | ->getMock(); |
| 24 | 24 | |
| 25 | - $this->memcacheStorage = new MemcacheStorage($this->memcacheMock,'localhost',11211); |
|
| 25 | + $this->memcacheStorage = new MemcacheStorage($this->memcacheMock, 'localhost', 11211); |
|
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | public function testAddServer() |
@@ -31,8 +31,8 @@ |
||
| 31 | 31 | * @param string $key |
| 32 | 32 | * @return bool |
| 33 | 33 | */ |
| 34 | - public function has($key){ |
|
| 35 | - if (!empty($this->mmc->get($key))){ |
|
| 34 | + public function has($key) { |
|
| 35 | + if (!empty($this->mmc->get($key))) { |
|
| 36 | 36 | return true; |
| 37 | 37 | } |
| 38 | 38 | return false; |
@@ -33,7 +33,7 @@ |
||
| 33 | 33 | * @param string $key |
| 34 | 34 | * @return bool |
| 35 | 35 | */ |
| 36 | - public function has($key){ |
|
| 36 | + public function has($key) { |
|
| 37 | 37 | return false; |
| 38 | 38 | } |
| 39 | 39 | |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | */ |
| 49 | 49 | public function set($key, $value, $expires = null) |
| 50 | 50 | { |
| 51 | - if ($expires === null){ |
|
| 51 | + if ($expires === null) { |
|
| 52 | 52 | $expires = $this->expires; |
| 53 | 53 | } |
| 54 | 54 | |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | * @param int $expires |
| 60 | 60 | * @return Cache |
| 61 | 61 | */ |
| 62 | - public function setExpires($expires){ |
|
| 62 | + public function setExpires($expires) { |
|
| 63 | 63 | $this->expires = $expires; |
| 64 | 64 | return $this; |
| 65 | 65 | } |