Apply some coding style changes.

This commit is contained in:
Daniele Alessandri
2011-10-18 15:03:04 +02:00
parent 4251664095
commit 20d872a306
222 changed files with 2789 additions and 1281 deletions
+8 -3
View File
@@ -9,12 +9,15 @@ require 'SharedConfigurations.php';
use Predis\Commands\ScriptedCommand;
class IncrementExistingKey extends ScriptedCommand {
protected function keysCount() {
class IncrementExistingKey extends ScriptedCommand
{
protected function keysCount()
{
return 1;
}
public function getScript() {
public function getScript()
{
return
<<<LUA
if redis('exists', KEYS[1]) == 1 then
@@ -25,8 +28,10 @@ LUA;
}
$client = new Predis\Client($single_server, 'dev');
$client->getProfile()->defineCommand('increx', 'IncrementExistingKey');
$client->set('foo', 10);
var_dump($client->increx('foo')); // int(11)
var_dump($client->increx('bar')); // NULL