@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | */ |
17 | 17 | public function __construct(array $config) |
18 | 18 | { |
19 | - $this->handler= new \Memcached($config['bucket']); |
|
19 | + $this->handler = new \Memcached($config['bucket']); |
|
20 | 20 | $this->handler->setOption(\Memcached::OPT_LIBKETAMA_COMPATIBLE, true); |
21 | 21 | $this->handler->setOption(\Memcached::OPT_BINARY_PROTOCOL, true); |
22 | 22 | if (!count($this->handler->getServerList())) { |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | * |
50 | 50 | * @return bool True on success and false on failure |
51 | 51 | */ |
52 | - public function set($key, $value, $ttl = null){ |
|
52 | + public function set($key, $value, $ttl = null) { |
|
53 | 53 | return $this->handler->set($key, $value, intval($ttl)); |
54 | 54 | } |
55 | 55 | /** |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | * |
60 | 60 | * @return bool True on success and false on failure |
61 | 61 | */ |
62 | - public function delete($key){ |
|
62 | + public function delete($key) { |
|
63 | 63 | return (bool) $this->handler->delete($key); |
64 | 64 | } |
65 | 65 | /** |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | * |
68 | 68 | * @return bool True on success and false on failure |
69 | 69 | */ |
70 | - public function clear(){ |
|
70 | + public function clear() { |
|
71 | 71 | return $this->handler->flush(); |
72 | 72 | } |
73 | 73 | /** |
@@ -3,7 +3,7 @@ |
||
3 | 3 | |
4 | 4 | use Composer\Autoload\ClassLoader; |
5 | 5 | |
6 | -require_once dirname(__DIR__) . '/vendor/autoload.php'; |
|
6 | +require_once dirname(__DIR__).'/vendor/autoload.php'; |
|
7 | 7 | $loader = new ClassLoader(); |
8 | 8 | $loader->add('tests', dirname(__DIR__)); |
9 | 9 | $loader->register(); |
@@ -21,10 +21,10 @@ discard block |
||
21 | 21 | |
22 | 22 | public function testSetGetDeleteItem() |
23 | 23 | { |
24 | - $ins1 = $this->client->set('test1','value1'); |
|
24 | + $ins1 = $this->client->set('test1', 'value1'); |
|
25 | 25 | $this->assertTrue($ins1); |
26 | 26 | $value1 = $this->client->get('test1'); |
27 | - $this->assertEquals('value1',$value1); |
|
27 | + $this->assertEquals('value1', $value1); |
|
28 | 28 | $delete = $this->client->delete('test1'); |
29 | 29 | $this->assertTrue($delete); |
30 | 30 | } |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | $this->assertEquals(0, $counter_d_0); |
71 | 71 | } |
72 | 72 | |
73 | - public function testClear(){ |
|
73 | + public function testClear() { |
|
74 | 74 | $clear = $this->client->clear(); |
75 | 75 | $this->assertTrue($clear); |
76 | 76 | } |