Quellcode durchsuchen

Change code formatting for the classes in the Predis\Commands namespace.

Daniele Alessandri vor 14 Jahren
Ursprung
Commit
3b70d1e020
100 geänderte Dateien mit 551 neuen und 186 gelöschten Zeilen
  1. 3 1
      lib/Predis/Commands/Append.php
  2. 7 2
      lib/Predis/Commands/Auth.php
  3. 8 2
      lib/Predis/Commands/BackgroundRewriteAppendOnlyFile.php
  4. 8 2
      lib/Predis/Commands/BackgroundSave.php
  5. 24 24
      lib/Predis/Commands/Command.php
  6. 7 2
      lib/Predis/Commands/Config.php
  7. 7 2
      lib/Predis/Commands/DatabaseSize.php
  8. 3 1
      lib/Predis/Commands/Decrement.php
  9. 3 1
      lib/Predis/Commands/DecrementBy.php
  10. 8 4
      lib/Predis/Commands/Delete.php
  11. 7 2
      lib/Predis/Commands/Discard.php
  12. 7 2
      lib/Predis/Commands/DoEcho.php
  13. 7 2
      lib/Predis/Commands/Exec.php
  14. 7 2
      lib/Predis/Commands/Exists.php
  15. 7 2
      lib/Predis/Commands/Expire.php
  16. 7 2
      lib/Predis/Commands/ExpireAt.php
  17. 7 2
      lib/Predis/Commands/FlushAll.php
  18. 7 2
      lib/Predis/Commands/FlushDatabase.php
  19. 3 1
      lib/Predis/Commands/Get.php
  20. 3 1
      lib/Predis/Commands/GetBit.php
  21. 7 3
      lib/Predis/Commands/GetMultiple.php
  22. 3 1
      lib/Predis/Commands/GetRange.php
  23. 3 1
      lib/Predis/Commands/GetSet.php
  24. 7 2
      lib/Predis/Commands/HashDelete.php
  25. 7 2
      lib/Predis/Commands/HashExists.php
  26. 3 1
      lib/Predis/Commands/HashGet.php
  27. 4 1
      lib/Predis/Commands/HashGetAll.php
  28. 4 1
      lib/Predis/Commands/HashGetMultiple.php
  29. 3 1
      lib/Predis/Commands/HashIncrementBy.php
  30. 3 1
      lib/Predis/Commands/HashKeys.php
  31. 3 1
      lib/Predis/Commands/HashLength.php
  32. 7 2
      lib/Predis/Commands/HashSet.php
  33. 4 1
      lib/Predis/Commands/HashSetMultiple.php
  34. 7 2
      lib/Predis/Commands/HashSetPreserve.php
  35. 3 1
      lib/Predis/Commands/HashValues.php
  36. 3 1
      lib/Predis/Commands/Increment.php
  37. 3 1
      lib/Predis/Commands/IncrementBy.php
  38. 10 2
      lib/Predis/Commands/Info.php
  39. 7 2
      lib/Predis/Commands/Keys.php
  40. 7 2
      lib/Predis/Commands/LastSave.php
  41. 3 1
      lib/Predis/Commands/ListIndex.php
  42. 3 1
      lib/Predis/Commands/ListInsert.php
  43. 3 1
      lib/Predis/Commands/ListLength.php
  44. 3 1
      lib/Predis/Commands/ListPopFirst.php
  45. 4 1
      lib/Predis/Commands/ListPopFirstBlocking.php
  46. 3 1
      lib/Predis/Commands/ListPopLast.php
  47. 3 1
      lib/Predis/Commands/ListPopLastBlocking.php
  48. 4 1
      lib/Predis/Commands/ListPopLastPushHead.php
  49. 4 1
      lib/Predis/Commands/ListPopLastPushHeadBlocking.php
  50. 3 1
      lib/Predis/Commands/ListPushHead.php
  51. 3 1
      lib/Predis/Commands/ListPushHeadX.php
  52. 3 1
      lib/Predis/Commands/ListPushTail.php
  53. 3 1
      lib/Predis/Commands/ListPushTailX.php
  54. 3 1
      lib/Predis/Commands/ListRange.php
  55. 3 1
      lib/Predis/Commands/ListRemove.php
  56. 3 1
      lib/Predis/Commands/ListSet.php
  57. 3 1
      lib/Predis/Commands/ListTrim.php
  58. 11 3
      lib/Predis/Commands/MoveKey.php
  59. 7 2
      lib/Predis/Commands/Multi.php
  60. 7 2
      lib/Predis/Commands/Persist.php
  61. 8 2
      lib/Predis/Commands/Ping.php
  62. 7 2
      lib/Predis/Commands/Publish.php
  63. 7 2
      lib/Predis/Commands/Quit.php
  64. 11 3
      lib/Predis/Commands/RandomKey.php
  65. 7 2
      lib/Predis/Commands/Rename.php
  66. 11 3
      lib/Predis/Commands/RenamePreserve.php
  67. 7 2
      lib/Predis/Commands/Save.php
  68. 7 2
      lib/Predis/Commands/SelectDatabase.php
  69. 3 1
      lib/Predis/Commands/Set.php
  70. 7 2
      lib/Predis/Commands/SetAdd.php
  71. 3 1
      lib/Predis/Commands/SetBit.php
  72. 3 1
      lib/Predis/Commands/SetCardinality.php
  73. 3 1
      lib/Predis/Commands/SetDifference.php
  74. 3 1
      lib/Predis/Commands/SetDifferenceStore.php
  75. 3 1
      lib/Predis/Commands/SetExpire.php
  76. 7 3
      lib/Predis/Commands/SetIntersection.php
  77. 7 3
      lib/Predis/Commands/SetIntersectionStore.php
  78. 7 2
      lib/Predis/Commands/SetIsMember.php
  79. 3 1
      lib/Predis/Commands/SetMembers.php
  80. 11 3
      lib/Predis/Commands/SetMove.php
  81. 12 8
      lib/Predis/Commands/SetMultiple.php
  82. 7 2
      lib/Predis/Commands/SetMultiplePreserve.php
  83. 3 1
      lib/Predis/Commands/SetPop.php
  84. 7 2
      lib/Predis/Commands/SetPreserve.php
  85. 3 1
      lib/Predis/Commands/SetRandomMember.php
  86. 3 1
      lib/Predis/Commands/SetRange.php
  87. 7 2
      lib/Predis/Commands/SetRemove.php
  88. 3 1
      lib/Predis/Commands/SetUnion.php
  89. 3 1
      lib/Predis/Commands/SetUnionStore.php
  90. 7 2
      lib/Predis/Commands/Shutdown.php
  91. 8 2
      lib/Predis/Commands/SlaveOf.php
  92. 4 1
      lib/Predis/Commands/Sort.php
  93. 3 1
      lib/Predis/Commands/Strlen.php
  94. 8 2
      lib/Predis/Commands/Subscribe.php
  95. 8 2
      lib/Predis/Commands/SubscribeByPattern.php
  96. 3 1
      lib/Predis/Commands/Substr.php
  97. 3 1
      lib/Predis/Commands/TimeToLive.php
  98. 3 1
      lib/Predis/Commands/Type.php
  99. 7 2
      lib/Predis/Commands/Unsubscribe.php
  100. 7 2
      lib/Predis/Commands/UnsubscribeByPattern.php

+ 3 - 1
lib/Predis/Commands/Append.php

@@ -3,5 +3,7 @@
 namespace Predis\Commands;
 
 class Append extends Command {
-    public function getId() { return 'APPEND'; }
+    public function getId() {
+        return 'APPEND';
+    }
 }

+ 7 - 2
lib/Predis/Commands/Auth.php

@@ -3,6 +3,11 @@
 namespace Predis\Commands;
 
 class Auth extends Command {
-    protected function canBeHashed() { return false; }
-    public function getId() { return 'AUTH'; }
+    public function getId() {
+        return 'AUTH';
+    }
+
+    protected function canBeHashed() {
+        return false;
+    }
 }

+ 8 - 2
lib/Predis/Commands/BackgroundRewriteAppendOnlyFile.php

@@ -3,8 +3,14 @@
 namespace Predis\Commands;
 
 class BackgroundRewriteAppendOnlyFile extends Command {
-    protected function canBeHashed() { return false; }
-    public function getId() { return 'BGREWRITEAOF'; }
+    public function getId() {
+        return 'BGREWRITEAOF';
+    }
+
+    protected function canBeHashed() {
+        return false;
+    }
+
     public function parseResponse($data) {
         return $data == 'Background append only file rewriting started';
     }

+ 8 - 2
lib/Predis/Commands/BackgroundSave.php

@@ -3,8 +3,14 @@
 namespace Predis\Commands;
 
 class BackgroundSave extends Command {
-    protected function canBeHashed() { return false; }
-    public function getId() { return 'BGSAVE'; }
+    public function getId() {
+        return 'BGSAVE';
+    }
+
+    protected function canBeHashed() {
+        return false;
+    }
+
     public function parseResponse($data) {
         if ($data == 'Background saving started') {
             return true;

+ 24 - 24
lib/Predis/Commands/Command.php

@@ -8,6 +8,30 @@ abstract class Command implements ICommand {
     private $_hash;
     private $_arguments = array();
 
+    protected function filterArguments(Array $arguments) {
+        return $arguments;
+    }
+
+    public function setArguments(/* arguments */) {
+        $this->_arguments = $this->filterArguments(func_get_args());
+        unset($this->_hash);
+    }
+
+    public function setArgumentsArray(Array $arguments) {
+        $this->_arguments = $this->filterArguments($arguments);
+        unset($this->_hash);
+    }
+
+    public function getArguments() {
+        return $this->_arguments;
+    }
+
+    public function getArgument($index = 0) {
+        if (isset($this->_arguments[$index]) === true) {
+            return $this->_arguments[$index];
+        }
+    }
+
     protected function canBeHashed() {
         return isset($this->_arguments[0]);
     }
@@ -50,30 +74,6 @@ abstract class Command implements ICommand {
         return null;
     }
 
-    protected function filterArguments(Array $arguments) {
-        return $arguments;
-    }
-
-    public function setArguments(/* arguments */) {
-        $this->_arguments = $this->filterArguments(func_get_args());
-        unset($this->_hash);
-    }
-
-    public function setArgumentsArray(Array $arguments) {
-        $this->_arguments = $this->filterArguments($arguments);
-        unset($this->_hash);
-    }
-
-    public function getArguments() {
-        return $this->_arguments;
-    }
-
-    public function getArgument($index = 0) {
-        if (isset($this->_arguments[$index]) === true) {
-            return $this->_arguments[$index];
-        }
-    }
-
     public function parseResponse($data) {
         return $data;
     }

+ 7 - 2
lib/Predis/Commands/Config.php

@@ -3,6 +3,11 @@
 namespace Predis\Commands;
 
 class Config extends Command {
-    protected function canBeHashed() { return false; }
-    public function getId() { return 'CONFIG'; }
+    public function getId() {
+        return 'CONFIG';
+    }
+
+    protected function canBeHashed() {
+        return false;
+    }
 }

+ 7 - 2
lib/Predis/Commands/DatabaseSize.php

@@ -3,6 +3,11 @@
 namespace Predis\Commands;
 
 class DatabaseSize extends Command {
-    protected function canBeHashed() { return false; }
-    public function getId() { return 'DBSIZE'; }
+    public function getId() {
+        return 'DBSIZE';
+    }
+
+    protected function canBeHashed() {
+        return false;
+    }
 }

+ 3 - 1
lib/Predis/Commands/Decrement.php

@@ -3,5 +3,7 @@
 namespace Predis\Commands;
 
 class Decrement extends Command {
-    public function getId() { return 'DECR'; }
+    public function getId() {
+        return 'DECR';
+    }
 }

+ 3 - 1
lib/Predis/Commands/DecrementBy.php

@@ -3,5 +3,7 @@
 namespace Predis\Commands;
 
 class DecrementBy extends Command {
-    public function getId() { return 'DECRBY'; }
+    public function getId() {
+        return 'DECRBY';
+    }
 }

+ 8 - 4
lib/Predis/Commands/Delete.php

@@ -5,6 +5,14 @@ namespace Predis\Commands;
 use Predis\Utils;
 
 class Delete extends Command {
+    public function getId() {
+        return 'DEL';
+    }
+
+    public function filterArguments(Array $arguments) {
+        return Utils::filterArrayArguments($arguments);
+    }
+
     protected function canBeHashed() {
         $args = $this->getArguments();
         if (count($args) === 1) {
@@ -12,8 +20,4 @@ class Delete extends Command {
         }
         return $this->checkSameHashForKeys($args);
     }
-    public function getId() { return 'DEL'; }
-    public function filterArguments(Array $arguments) {
-        return Utils::filterArrayArguments($arguments);
-    }
 }

+ 7 - 2
lib/Predis/Commands/Discard.php

@@ -3,6 +3,11 @@
 namespace Predis\Commands;
 
 class Discard extends Command {
-    protected function canBeHashed() { return false; }
-    public function getId() { return 'DISCARD'; }
+    public function getId() {
+        return 'DISCARD';
+    }
+
+    protected function canBeHashed() {
+        return false;
+    }
 }

+ 7 - 2
lib/Predis/Commands/DoEcho.php

@@ -3,6 +3,11 @@
 namespace Predis\Commands;
 
 class DoEcho extends Command {
-    protected function canBeHashed() { return false; }
-    public function getId() { return 'ECHO'; }
+    public function getId() {
+        return 'ECHO';
+    }
+
+    protected function canBeHashed() {
+        return false;
+    }
 }

+ 7 - 2
lib/Predis/Commands/Exec.php

@@ -3,6 +3,11 @@
 namespace Predis\Commands;
 
 class Exec extends Command {
-    protected function canBeHashed() { return false; }
-    public function getId() { return 'EXEC'; }
+    public function getId() {
+        return 'EXEC';
+    }
+
+    protected function canBeHashed() {
+        return false;
+    }
 }

+ 7 - 2
lib/Predis/Commands/Exists.php

@@ -3,6 +3,11 @@
 namespace Predis\Commands;
 
 class Exists extends Command {
-    public function getId() { return 'EXISTS'; }
-    public function parseResponse($data) { return (bool) $data; }
+    public function getId() {
+        return 'EXISTS';
+    }
+
+    public function parseResponse($data) {
+        return (bool) $data;
+    }
 }

+ 7 - 2
lib/Predis/Commands/Expire.php

@@ -3,6 +3,11 @@
 namespace Predis\Commands;
 
 class Expire extends Command {
-    public function getId() { return 'EXPIRE'; }
-    public function parseResponse($data) { return (bool) $data; }
+    public function getId() {
+        return 'EXPIRE';
+    }
+
+    public function parseResponse($data) {
+        return (bool) $data;
+    }
 }

+ 7 - 2
lib/Predis/Commands/ExpireAt.php

@@ -3,6 +3,11 @@
 namespace Predis\Commands;
 
 class ExpireAt extends Command {
-    public function getId() { return 'EXPIREAT'; }
-    public function parseResponse($data) { return (bool) $data; }
+    public function getId() {
+        return 'EXPIREAT';
+    }
+
+    public function parseResponse($data) {
+        return (bool) $data;
+    }
 }

+ 7 - 2
lib/Predis/Commands/FlushAll.php

@@ -3,6 +3,11 @@
 namespace Predis\Commands;
 
 class FlushAll extends Command {
-    protected function canBeHashed() { return false; }
-    public function getId() { return 'FLUSHALL'; }
+    public function getId() {
+        return 'FLUSHALL';
+    }
+
+    protected function canBeHashed() {
+        return false;
+    }
 }

+ 7 - 2
lib/Predis/Commands/FlushDatabase.php

@@ -3,6 +3,11 @@
 namespace Predis\Commands;
 
 class FlushDatabase extends Command {
-    protected function canBeHashed() { return false; }
-    public function getId() { return 'FLUSHDB'; }
+    public function getId() {
+        return 'FLUSHDB';
+    }
+
+    protected function canBeHashed() {
+        return false;
+    }
 }

+ 3 - 1
lib/Predis/Commands/Get.php

@@ -3,5 +3,7 @@
 namespace Predis\Commands;
 
 class Get extends Command {
-    public function getId() { return 'GET'; }
+    public function getId() {
+        return 'GET';
+    }
 }

+ 3 - 1
lib/Predis/Commands/GetBit.php

@@ -3,5 +3,7 @@
 namespace Predis\Commands;
 
 class GetBit extends Command {
-    public function getId() { return 'GETBIT'; }
+    public function getId() {
+        return 'GETBIT';
+    }
 }

+ 7 - 3
lib/Predis/Commands/GetMultiple.php

@@ -5,11 +5,15 @@ namespace Predis\Commands;
 use Predis\Utils;
 
 class GetMultiple extends Command {
-    protected function canBeHashed() {
-        return $this->checkSameHashForKeys($this->getArguments());
+    public function getId() {
+        return 'MGET';
     }
-    public function getId() { return 'MGET'; }
+
     public function filterArguments(Array $arguments) {
         return Utils::filterArrayArguments($arguments);
     }
+
+    protected function canBeHashed() {
+        return $this->checkSameHashForKeys($this->getArguments());
+    }
 }

+ 3 - 1
lib/Predis/Commands/GetRange.php

@@ -3,5 +3,7 @@
 namespace Predis\Commands;
 
 class GetRange extends Command {
-    public function getId() { return 'GETRANGE'; }
+    public function getId() {
+        return 'GETRANGE';
+    }
 }

+ 3 - 1
lib/Predis/Commands/GetSet.php

@@ -3,5 +3,7 @@
 namespace Predis\Commands;
 
 class GetSet extends Command {
-    public function getId() { return 'GETSET'; }
+    public function getId() {
+        return 'GETSET';
+    }
 }

+ 7 - 2
lib/Predis/Commands/HashDelete.php

@@ -3,6 +3,11 @@
 namespace Predis\Commands;
 
 class HashDelete extends Command {
-    public function getId() { return 'HDEL'; }
-    public function parseResponse($data) { return (bool) $data; }
+    public function getId() {
+        return 'HDEL';
+    }
+
+    public function parseResponse($data) {
+        return (bool) $data;
+    }
 }

+ 7 - 2
lib/Predis/Commands/HashExists.php

@@ -3,6 +3,11 @@
 namespace Predis\Commands;
 
 class HashExists extends Command {
-    public function getId() { return 'HEXISTS'; }
-    public function parseResponse($data) { return (bool) $data; }
+    public function getId() {
+        return 'HEXISTS';
+    }
+
+    public function parseResponse($data) {
+        return (bool) $data;
+    }
 }

+ 3 - 1
lib/Predis/Commands/HashGet.php

@@ -3,5 +3,7 @@
 namespace Predis\Commands;
 
 class HashGet extends Command {
-    public function getId() { return 'HGET'; }
+    public function getId() {
+        return 'HGET';
+    }
 }

+ 4 - 1
lib/Predis/Commands/HashGetAll.php

@@ -5,7 +5,10 @@ namespace Predis\Commands;
 use Predis\Iterators\MultiBulkResponseTuple;
 
 class HashGetAll extends Command {
-    public function getId() { return 'HGETALL'; }
+    public function getId() {
+        return 'HGETALL';
+    }
+
     public function parseResponse($data) {
         if ($data instanceof \Iterator) {
             return new MultiBulkResponseTuple($data);

+ 4 - 1
lib/Predis/Commands/HashGetMultiple.php

@@ -3,7 +3,10 @@
 namespace Predis\Commands;
 
 class HashGetMultiple extends Command {
-    public function getId() { return 'HMGET'; }
+    public function getId() {
+        return 'HMGET';
+    }
+
     public function filterArguments(Array $arguments) {
         if (count($arguments) === 2 && is_array($arguments[1])) {
             $flattenedKVs = array($arguments[0]);

+ 3 - 1
lib/Predis/Commands/HashIncrementBy.php

@@ -3,5 +3,7 @@
 namespace Predis\Commands;
 
 class HashIncrementBy extends Command {
-    public function getId() { return 'HINCRBY'; }
+    public function getId() {
+        return 'HINCRBY';
+    }
 }

+ 3 - 1
lib/Predis/Commands/HashKeys.php

@@ -3,5 +3,7 @@
 namespace Predis\Commands;
 
 class HashKeys extends Command {
-    public function getId() { return 'HKEYS'; }
+    public function getId() {
+        return 'HKEYS';
+    }
 }

+ 3 - 1
lib/Predis/Commands/HashLength.php

@@ -3,5 +3,7 @@
 namespace Predis\Commands;
 
 class HashLength extends Command {
-    public function getId() { return 'HLEN'; }
+    public function getId() {
+        return 'HLEN';
+    }
 }

+ 7 - 2
lib/Predis/Commands/HashSet.php

@@ -3,6 +3,11 @@
 namespace Predis\Commands;
 
 class HashSet extends Command {
-    public function getId() { return 'HSET'; }
-    public function parseResponse($data) { return (bool) $data; }
+    public function getId() {
+        return 'HSET';
+    }
+
+    public function parseResponse($data) {
+        return (bool) $data;
+    }
 }

+ 4 - 1
lib/Predis/Commands/HashSetMultiple.php

@@ -3,7 +3,10 @@
 namespace Predis\Commands;
 
 class HashSetMultiple extends Command {
-    public function getId() { return 'HMSET'; }
+    public function getId() {
+        return 'HMSET';
+    }
+
     public function filterArguments(Array $arguments) {
         if (count($arguments) === 2 && is_array($arguments[1])) {
             $flattenedKVs = array($arguments[0]);

+ 7 - 2
lib/Predis/Commands/HashSetPreserve.php

@@ -3,6 +3,11 @@
 namespace Predis\Commands;
 
 class HashSetPreserve extends Command {
-    public function getId() { return 'HSETNX'; }
-    public function parseResponse($data) { return (bool) $data; }
+    public function getId() {
+        return 'HSETNX';
+    }
+
+    public function parseResponse($data) {
+        return (bool) $data;
+    }
 }

+ 3 - 1
lib/Predis/Commands/HashValues.php

@@ -3,5 +3,7 @@
 namespace Predis\Commands;
 
 class HashValues extends Command {
-    public function getId() { return 'HVALS'; }
+    public function getId() {
+        return 'HVALS';
+    }
 }

+ 3 - 1
lib/Predis/Commands/Increment.php

@@ -3,5 +3,7 @@
 namespace Predis\Commands;
 
 class Increment extends Command {
-    public function getId() { return 'INCR'; }
+    public function getId() {
+        return 'INCR';
+    }
 }

+ 3 - 1
lib/Predis/Commands/IncrementBy.php

@@ -3,5 +3,7 @@
 namespace Predis\Commands;
 
 class IncrementBy extends Command {
-    public function getId() { return 'INCRBY'; }
+    public function getId() {
+        return 'INCRBY';
+    }
 }

+ 10 - 2
lib/Predis/Commands/Info.php

@@ -3,8 +3,14 @@
 namespace Predis\Commands;
 
 class Info extends Command {
-    protected function canBeHashed() { return false; }
-    public function getId() { return 'INFO'; }
+    public function getId() {
+        return 'INFO';
+    }
+
+    protected function canBeHashed() {
+        return false;
+    }
+
     public function parseResponse($data) {
         $info      = array();
         $infoLines = explode("\r\n", $data, -1);
@@ -26,6 +32,7 @@ class Info extends Command {
         }
         return $info;
     }
+
     protected function parseDatabaseStats($str) {
         $db = array();
         foreach (explode(',', $str) as $dbvar) {
@@ -34,6 +41,7 @@ class Info extends Command {
         }
         return $db;
     }
+
     protected function parseAllocationStats($str) {
         $stats = array();
         foreach (explode(',', $str) as $kv) {

+ 7 - 2
lib/Predis/Commands/Keys.php

@@ -3,6 +3,11 @@
 namespace Predis\Commands;
 
 class Keys extends Command {
-    protected function canBeHashed() { return false; }
-    public function getId() { return 'KEYS'; }
+    public function getId() {
+        return 'KEYS';
+    }
+
+    protected function canBeHashed() {
+        return false;
+    }
 }

+ 7 - 2
lib/Predis/Commands/LastSave.php

@@ -3,6 +3,11 @@
 namespace Predis\Commands;
 
 class LastSave extends Command {
-    protected function canBeHashed() { return false; }
-    public function getId() { return 'LASTSAVE'; }
+    public function getId() {
+        return 'LASTSAVE';
+    }
+
+    protected function canBeHashed() {
+        return false;
+    }
 }

+ 3 - 1
lib/Predis/Commands/ListIndex.php

@@ -3,5 +3,7 @@
 namespace Predis\Commands;
 
 class ListIndex extends Command {
-    public function getId() { return 'LINDEX'; }
+    public function getId() {
+        return 'LINDEX';
+    }
 }

+ 3 - 1
lib/Predis/Commands/ListInsert.php

@@ -3,5 +3,7 @@
 namespace Predis\Commands;
 
 class ListInsert extends Command {
-    public function getId() { return 'LINSERT'; }
+    public function getId() {
+        return 'LINSERT';
+    }
 }

+ 3 - 1
lib/Predis/Commands/ListLength.php

@@ -3,5 +3,7 @@
 namespace Predis\Commands;
 
 class ListLength extends Command {
-    public function getId() { return 'LLEN'; }
+    public function getId() {
+        return 'LLEN';
+    }
 }

+ 3 - 1
lib/Predis/Commands/ListPopFirst.php

@@ -3,5 +3,7 @@
 namespace Predis\Commands;
 
 class ListPopFirst extends Command {
-    public function getId() { return 'LPOP'; }
+    public function getId() {
+        return 'LPOP';
+    }
 }

+ 4 - 1
lib/Predis/Commands/ListPopFirstBlocking.php

@@ -3,10 +3,13 @@
 namespace Predis\Commands;
 
 class ListPopFirstBlocking extends Command {
+    public function getId() {
+        return 'BLPOP';
+    }
+
     protected function canBeHashed() {
         return $this->checkSameHashForKeys(
             array_slice(($args = $this->getArguments()), 0, count($args) - 1)
         );
     }
-    public function getId() { return 'BLPOP'; }
 }

+ 3 - 1
lib/Predis/Commands/ListPopLast.php

@@ -3,5 +3,7 @@
 namespace Predis\Commands;
 
 class ListPopLast extends Command {
-    public function getId() { return 'RPOP'; }
+    public function getId() {
+        return 'RPOP';
+    }
 }

+ 3 - 1
lib/Predis/Commands/ListPopLastBlocking.php

@@ -3,5 +3,7 @@
 namespace Predis\Commands;
 
 class ListPopLastBlocking extends ListPopFirstBlocking {
-    public function getId() { return 'BRPOP'; }
+    public function getId() {
+        return 'BRPOP';
+    }
 }

+ 4 - 1
lib/Predis/Commands/ListPopLastPushHead.php

@@ -3,8 +3,11 @@
 namespace Predis\Commands;
 
 class ListPopLastPushHead extends Command {
+    public function getId() {
+        return 'RPOPLPUSH';
+    }
+
     protected function canBeHashed() {
         return $this->checkSameHashForKeys($this->getArguments());
     }
-    public function getId() { return 'RPOPLPUSH'; }
 }

+ 4 - 1
lib/Predis/Commands/ListPopLastPushHeadBlocking.php

@@ -3,10 +3,13 @@
 namespace Predis\Commands;
 
 class ListPopLastPushHeadBlocking extends Command {
+    public function getId() {
+        return 'BRPOPLPUSH';
+    }
+
     protected function canBeHashed() {
         return $this->checkSameHashForKeys(
             array_slice($args = $this->getArguments(), 0, count($args) - 1)
         );
     }
-    public function getId() { return 'BRPOPLPUSH'; }
 }

+ 3 - 1
lib/Predis/Commands/ListPushHead.php

@@ -3,5 +3,7 @@
 namespace Predis\Commands;
 
 class ListPushHead extends Command {
-    public function getId() { return 'LPUSH'; }
+    public function getId() {
+        return 'LPUSH';
+    }
 }

+ 3 - 1
lib/Predis/Commands/ListPushHeadX.php

@@ -3,5 +3,7 @@
 namespace Predis\Commands;
 
 class ListPushHeadX extends Command {
-    public function getId() { return 'LPUSHX'; }
+    public function getId() {
+        return 'LPUSHX';
+    }
 }

+ 3 - 1
lib/Predis/Commands/ListPushTail.php

@@ -3,5 +3,7 @@
 namespace Predis\Commands;
 
 class ListPushTail extends Command {
-    public function getId() { return 'RPUSH'; }
+    public function getId() {
+        return 'RPUSH';
+    }
 }

+ 3 - 1
lib/Predis/Commands/ListPushTailX.php

@@ -3,5 +3,7 @@
 namespace Predis\Commands;
 
 class ListPushTailX extends Command {
-    public function getId() { return 'RPUSHX'; }
+    public function getId() {
+        return 'RPUSHX';
+    }
 }

+ 3 - 1
lib/Predis/Commands/ListRange.php

@@ -3,5 +3,7 @@
 namespace Predis\Commands;
 
 class ListRange extends Command {
-    public function getId() { return 'LRANGE'; }
+    public function getId() {
+        return 'LRANGE';
+    }
 }

+ 3 - 1
lib/Predis/Commands/ListRemove.php

@@ -3,5 +3,7 @@
 namespace Predis\Commands;
 
 class ListRemove extends Command {
-    public function getId() { return 'LREM'; }
+    public function getId() {
+        return 'LREM';
+    }
 }

+ 3 - 1
lib/Predis/Commands/ListSet.php

@@ -3,5 +3,7 @@
 namespace Predis\Commands;
 
 class ListSet extends Command {
-    public function getId() { return 'LSET'; }
+    public function getId() {
+        return 'LSET';
+    }
 }

+ 3 - 1
lib/Predis/Commands/ListTrim.php

@@ -3,5 +3,7 @@
 namespace Predis\Commands;
 
 class ListTrim extends Command {
-    public function getId() { return 'LTRIM'; }
+    public function getId() {
+        return 'LTRIM';
+    }
 }

+ 11 - 3
lib/Predis/Commands/MoveKey.php

@@ -3,7 +3,15 @@
 namespace Predis\Commands;
 
 class MoveKey extends Command {
-    protected function canBeHashed() { return false; }
-    public function getId() { return 'MOVE'; }
-    public function parseResponse($data) { return (bool) $data; }
+    public function getId() {
+        return 'MOVE';
+    }
+
+    protected function canBeHashed() {
+        return false;
+    }
+
+    public function parseResponse($data) {
+        return (bool) $data;
+    }
 }

+ 7 - 2
lib/Predis/Commands/Multi.php

@@ -3,6 +3,11 @@
 namespace Predis\Commands;
 
 class Multi extends Command {
-    protected function canBeHashed() { return false; }
-    public function getId() { return 'MULTI'; }
+    public function getId() {
+        return 'MULTI';
+    }
+
+    protected function canBeHashed() {
+        return false;
+    }
 }

+ 7 - 2
lib/Predis/Commands/Persist.php

@@ -3,6 +3,11 @@
 namespace Predis\Commands;
 
 class Persist extends Command {
-    public function getId() { return 'PERSIST'; }
-    public function parseResponse($data) { return (bool) $data; }
+    public function getId() {
+        return 'PERSIST';
+    }
+
+    public function parseResponse($data) {
+        return (bool) $data;
+    }
 }

+ 8 - 2
lib/Predis/Commands/Ping.php

@@ -3,8 +3,14 @@
 namespace Predis\Commands;
 
 class Ping extends Command {
-    protected function canBeHashed() { return false; }
-    public function getId() { return 'PING'; }
+    public function getId() {
+        return 'PING';
+    }
+
+    protected function canBeHashed() {
+        return false;
+    }
+
     public function parseResponse($data) {
         return $data === 'PONG' ? true : false;
     }

+ 7 - 2
lib/Predis/Commands/Publish.php

@@ -3,6 +3,11 @@
 namespace Predis\Commands;
 
 class Publish extends Command {
-    protected function canBeHashed() { return false; }
-    public function getId() { return 'PUBLISH'; }
+    public function getId() {
+        return 'PUBLISH';
+    }
+
+    protected function canBeHashed() {
+        return false;
+    }
 }

+ 7 - 2
lib/Predis/Commands/Quit.php

@@ -3,6 +3,11 @@
 namespace Predis\Commands;
 
 class Quit extends Command {
-    protected function canBeHashed() { return false; }
-    public function getId() { return 'QUIT'; }
+    public function getId() {
+        return 'QUIT';
+    }
+
+    protected function canBeHashed() {
+        return false;
+    }
 }

+ 11 - 3
lib/Predis/Commands/RandomKey.php

@@ -3,7 +3,15 @@
 namespace Predis\Commands;
 
 class RandomKey extends Command {
-    protected function canBeHashed() { return false; }
-    public function getId() { return 'RANDOMKEY'; }
-    public function parseResponse($data) { return $data !== '' ? $data : null; }
+    public function getId() {
+        return 'RANDOMKEY';
+    }
+
+    protected function canBeHashed() {
+        return false;
+    }
+
+    public function parseResponse($data) {
+        return $data !== '' ? $data : null;
+    }
 }

+ 7 - 2
lib/Predis/Commands/Rename.php

@@ -3,6 +3,11 @@
 namespace Predis\Commands;
 
 class Rename extends Command {
-    protected function canBeHashed() { return false; }
-    public function getId() { return 'RENAME'; }
+    public function getId() {
+        return 'RENAME';
+    }
+
+    protected function canBeHashed() {
+        return false;
+    }
 }

+ 11 - 3
lib/Predis/Commands/RenamePreserve.php

@@ -3,7 +3,15 @@
 namespace Predis\Commands;
 
 class RenamePreserve extends Command {
-    protected function canBeHashed() { return false; }
-    public function getId() { return 'RENAMENX'; }
-    public function parseResponse($data) { return (bool) $data; }
+    public function getId() {
+        return 'RENAMENX';
+    }
+
+    protected function canBeHashed() {
+        return false;
+    }
+
+    public function parseResponse($data) {
+        return (bool) $data;
+    }
 }

+ 7 - 2
lib/Predis/Commands/Save.php

@@ -3,6 +3,11 @@
 namespace Predis\Commands;
 
 class Save extends Command {
-    protected function canBeHashed() { return false; }
-    public function getId() { return 'SAVE'; }
+    public function getId() {
+        return 'SAVE';
+    }
+
+    protected function canBeHashed() {
+        return false;
+    }
 }

+ 7 - 2
lib/Predis/Commands/SelectDatabase.php

@@ -3,6 +3,11 @@
 namespace Predis\Commands;
 
 class SelectDatabase extends Command {
-    protected function canBeHashed() { return false; }
-    public function getId() { return 'SELECT'; }
+    public function getId() {
+        return 'SELECT';
+    }
+
+    protected function canBeHashed() {
+        return false;
+    }
 }

+ 3 - 1
lib/Predis/Commands/Set.php

@@ -3,5 +3,7 @@
 namespace Predis\Commands;
 
 class Set extends Command {
-    public function getId() { return 'SET'; }
+    public function getId() {
+        return 'SET';
+    }
 }

+ 7 - 2
lib/Predis/Commands/SetAdd.php

@@ -3,6 +3,11 @@
 namespace Predis\Commands;
 
 class SetAdd extends Command {
-    public function getId() { return 'SADD'; }
-    public function parseResponse($data) { return (bool) $data; }
+    public function getId() {
+        return 'SADD';
+    }
+
+    public function parseResponse($data) {
+        return (bool) $data;
+    }
 }

+ 3 - 1
lib/Predis/Commands/SetBit.php

@@ -3,5 +3,7 @@
 namespace Predis\Commands;
 
 class SetBit extends Command {
-    public function getId() { return 'SETBIT'; }
+    public function getId() {
+        return 'SETBIT';
+    }
 }

+ 3 - 1
lib/Predis/Commands/SetCardinality.php

@@ -3,5 +3,7 @@
 namespace Predis\Commands;
 
 class SetCardinality extends Command {
-    public function getId() { return 'SCARD'; }
+    public function getId() {
+        return 'SCARD';
+    }
 }

+ 3 - 1
lib/Predis/Commands/SetDifference.php

@@ -3,5 +3,7 @@
 namespace Predis\Commands;
 
 class SetDifference extends SetIntersection {
-    public function getId() { return 'SDIFF'; }
+    public function getId() {
+        return 'SDIFF';
+    }
 }

+ 3 - 1
lib/Predis/Commands/SetDifferenceStore.php

@@ -3,5 +3,7 @@
 namespace Predis\Commands;
 
 class SetDifferenceStore extends SetIntersectionStore {
-    public function getId() { return 'SDIFFSTORE'; }
+    public function getId() {
+        return 'SDIFFSTORE';
+    }
 }

+ 3 - 1
lib/Predis/Commands/SetExpire.php

@@ -3,5 +3,7 @@
 namespace Predis\Commands;
 
 class SetExpire extends Command {
-    public function getId() { return 'SETEX'; }
+    public function getId() {
+        return 'SETEX';
+    }
 }

+ 7 - 3
lib/Predis/Commands/SetIntersection.php

@@ -5,11 +5,15 @@ namespace Predis\Commands;
 use Predis\Utils;
 
 class SetIntersection extends Command {
-    protected function canBeHashed() {
-        return $this->checkSameHashForKeys($this->getArguments());
+    public function getId() {
+        return 'SINTER';
     }
-    public function getId() { return 'SINTER'; }
+
     public function filterArguments(Array $arguments) {
         return Utils::filterArrayArguments($arguments);
     }
+
+    protected function canBeHashed() {
+        return $this->checkSameHashForKeys($this->getArguments());
+    }
 }

+ 7 - 3
lib/Predis/Commands/SetIntersectionStore.php

@@ -5,14 +5,18 @@ namespace Predis\Commands;
 use Predis\Utils;
 
 class SetIntersectionStore extends Command {
-    protected function canBeHashed() {
-        return $this->checkSameHashForKeys($this->getArguments());
+    public function getId() {
+        return 'SINTERSTORE';
     }
-    public function getId() { return 'SINTERSTORE'; }
+
     public function filterArguments(Array $arguments) {
         if (count($arguments) === 2 && is_array($arguments[1])) {
             return array_merge(array($arguments[0]), $arguments[1]);
         }
         return $arguments;
     }
+
+    protected function canBeHashed() {
+        return $this->checkSameHashForKeys($this->getArguments());
+    }
 }

+ 7 - 2
lib/Predis/Commands/SetIsMember.php

@@ -3,6 +3,11 @@
 namespace Predis\Commands;
 
 class SetIsMember extends Command {
-    public function getId() { return 'SISMEMBER'; }
-    public function parseResponse($data) { return (bool) $data; }
+    public function getId() {
+        return 'SISMEMBER';
+    }
+
+    public function parseResponse($data) {
+        return (bool) $data;
+    }
 }

+ 3 - 1
lib/Predis/Commands/SetMembers.php

@@ -3,5 +3,7 @@
 namespace Predis\Commands;
 
 class SetMembers extends Command {
-    public function getId() { return 'SMEMBERS'; }
+    public function getId() {
+        return 'SMEMBERS';
+    }
 }

+ 11 - 3
lib/Predis/Commands/SetMove.php

@@ -3,7 +3,15 @@
 namespace Predis\Commands;
 
 class SetMove extends Command {
-    protected function canBeHashed() { return false; }
-    public function getId() { return 'SMOVE'; }
-    public function parseResponse($data) { return (bool) $data; }
+    public function getId() {
+        return 'SMOVE';
+    }
+
+    protected function canBeHashed() {
+        return false;
+    }
+
+    public function parseResponse($data) {
+        return (bool) $data;
+    }
 }

+ 12 - 8
lib/Predis/Commands/SetMultiple.php

@@ -3,15 +3,10 @@
 namespace Predis\Commands;
 
 class SetMultiple extends Command {
-    protected function canBeHashed() {
-        $args = $this->getArguments();
-        $keys = array();
-        for ($i = 0; $i < count($args); $i += 2) {
-            $keys[] = $args[$i];
-        }
-        return $this->checkSameHashForKeys($keys);
+    public function getId() {
+        return 'MSET';
     }
-    public function getId() { return 'MSET'; }
+
     public function filterArguments(Array $arguments) {
         if (count($arguments) === 1 && is_array($arguments[0])) {
             $flattenedKVs = array();
@@ -24,4 +19,13 @@ class SetMultiple extends Command {
         }
         return $arguments;
     }
+
+    protected function canBeHashed() {
+        $args = $this->getArguments();
+        $keys = array();
+        for ($i = 0; $i < count($args); $i += 2) {
+            $keys[] = $args[$i];
+        }
+        return $this->checkSameHashForKeys($keys);
+    }
 }

+ 7 - 2
lib/Predis/Commands/SetMultiplePreserve.php

@@ -3,6 +3,11 @@
 namespace Predis\Commands;
 
 class SetMultiplePreserve extends SetMultiple {
-    public function getId() { return 'MSETNX'; }
-    public function parseResponse($data) { return (bool) $data; }
+    public function getId() {
+        return 'MSETNX';
+    }
+
+    public function parseResponse($data) {
+        return (bool) $data;
+    }
 }

+ 3 - 1
lib/Predis/Commands/SetPop.php

@@ -3,5 +3,7 @@
 namespace Predis\Commands;
 
 class SetPop  extends Command {
-    public function getId() { return 'SPOP'; }
+    public function getId() {
+        return 'SPOP';
+    }
 }

+ 7 - 2
lib/Predis/Commands/SetPreserve.php

@@ -3,6 +3,11 @@
 namespace Predis\Commands;
 
 class SetPreserve extends Command {
-    public function getId() { return 'SETNX'; }
-    public function parseResponse($data) { return (bool) $data; }
+    public function getId() {
+        return 'SETNX';
+    }
+
+    public function parseResponse($data) {
+        return (bool) $data;
+    }
 }

+ 3 - 1
lib/Predis/Commands/SetRandomMember.php

@@ -3,5 +3,7 @@
 namespace Predis\Commands;
 
 class SetRandomMember extends Command {
-    public function getId() { return 'SRANDMEMBER'; }
+    public function getId() {
+        return 'SRANDMEMBER';
+    }
 }

+ 3 - 1
lib/Predis/Commands/SetRange.php

@@ -3,5 +3,7 @@
 namespace Predis\Commands;
 
 class SetRange extends Command {
-    public function getId() { return 'SETRANGE'; }
+    public function getId() {
+        return 'SETRANGE';
+    }
 }

+ 7 - 2
lib/Predis/Commands/SetRemove.php

@@ -3,6 +3,11 @@
 namespace Predis\Commands;
 
 class SetRemove extends Command {
-    public function getId() { return 'SREM'; }
-    public function parseResponse($data) { return (bool) $data; }
+    public function getId() {
+        return 'SREM';
+    }
+
+    public function parseResponse($data) {
+        return (bool) $data;
+    }
 }

+ 3 - 1
lib/Predis/Commands/SetUnion.php

@@ -3,5 +3,7 @@
 namespace Predis\Commands;
 
 class SetUnion extends SetIntersection {
-    public function getId() { return 'SUNION'; }
+    public function getId() {
+        return 'SUNION';
+    }
 }

+ 3 - 1
lib/Predis/Commands/SetUnionStore.php

@@ -3,5 +3,7 @@
 namespace Predis\Commands;
 
 class SetUnionStore extends SetIntersectionStore {
-    public function getId() { return 'SUNIONSTORE'; }
+    public function getId() {
+        return 'SUNIONSTORE';
+    }
 }

+ 7 - 2
lib/Predis/Commands/Shutdown.php

@@ -3,6 +3,11 @@
 namespace Predis\Commands;
 
 class Shutdown extends Command {
-    protected function canBeHashed() { return false; }
-    public function getId() { return 'SHUTDOWN'; }
+    public function getId() {
+        return 'SHUTDOWN';
+    }
+
+    protected function canBeHashed() {
+        return false;
+    }
 }

+ 8 - 2
lib/Predis/Commands/SlaveOf.php

@@ -3,12 +3,18 @@
 namespace Predis\Commands;
 
 class SlaveOf extends Command {
-    protected function canBeHashed() { return false; }
-    public function getId() { return 'SLAVEOF'; }
+    public function getId() {
+        return 'SLAVEOF';
+    }
+
     public function filterArguments(Array $arguments) {
         if (count($arguments) === 0 || $arguments[0] === 'NO ONE') {
             return array('NO', 'ONE');
         }
         return $arguments;
     }
+
+    protected function canBeHashed() {
+        return false;
+    }
 }

+ 4 - 1
lib/Predis/Commands/Sort.php

@@ -3,7 +3,10 @@
 namespace Predis\Commands;
 
 class Sort extends Command {
-    public function getId() { return 'SORT'; }
+    public function getId() {
+        return 'SORT';
+    }
+
     public function filterArguments(Array $arguments) {
         if (count($arguments) === 1) {
             return $arguments;

+ 3 - 1
lib/Predis/Commands/Strlen.php

@@ -3,5 +3,7 @@
 namespace Predis\Commands;
 
 class Strlen extends Command {
-    public function getId() { return 'STRLEN'; }
+    public function getId() {
+        return 'STRLEN';
+    }
 }

+ 8 - 2
lib/Predis/Commands/Subscribe.php

@@ -5,9 +5,15 @@ namespace Predis\Commands;
 use Predis\Utils;
 
 class Subscribe extends Command {
-    protected function canBeHashed() { return false; }
-    public function getId() { return 'SUBSCRIBE'; }
+    public function getId() {
+        return 'SUBSCRIBE';
+    }
+
     public function filterArguments(Array $arguments) {
         return Utils::filterArrayArguments($arguments);
     }
+
+    protected function canBeHashed() {
+        return false;
+    }
 }

+ 8 - 2
lib/Predis/Commands/SubscribeByPattern.php

@@ -3,9 +3,15 @@
 namespace Predis\Commands;
 
 class SubscribeByPattern extends Command {
-    protected function canBeHashed() { return false; }
-    public function getId() { return 'PSUBSCRIBE'; }
+    public function getId() {
+        return 'PSUBSCRIBE';
+    }
+
     public function filterArguments(Array $arguments) {
         return Utils::filterArrayArguments($arguments);
     }
+
+    protected function canBeHashed() {
+        return false;
+    }
 }

+ 3 - 1
lib/Predis/Commands/Substr.php

@@ -3,5 +3,7 @@
 namespace Predis\Commands;
 
 class Substr extends Command {
-    public function getId() { return 'SUBSTR'; }
+    public function getId() {
+        return 'SUBSTR';
+    }
 }

+ 3 - 1
lib/Predis/Commands/TimeToLive.php

@@ -3,5 +3,7 @@
 namespace Predis\Commands;
 
 class TimeToLive extends Command {
-    public function getId() { return 'TTL'; }
+    public function getId() {
+        return 'TTL';
+    }
 }

+ 3 - 1
lib/Predis/Commands/Type.php

@@ -3,5 +3,7 @@
 namespace Predis\Commands;
 
 class Type extends Command {
-    public function getId() { return 'TYPE'; }
+    public function getId() {
+        return 'TYPE';
+    }
 }

+ 7 - 2
lib/Predis/Commands/Unsubscribe.php

@@ -3,6 +3,11 @@
 namespace Predis\Commands;
 
 class Unsubscribe extends Command {
-    protected function canBeHashed() { return false; }
-    public function getId() { return 'UNSUBSCRIBE'; }
+    public function getId() {
+        return 'UNSUBSCRIBE';
+    }
+
+    protected function canBeHashed() {
+        return false;
+    }
 }

+ 7 - 2
lib/Predis/Commands/UnsubscribeByPattern.php

@@ -3,6 +3,11 @@
 namespace Predis\Commands;
 
 class UnsubscribeByPattern extends Command {
-    protected function canBeHashed() { return false; }
-    public function getId() { return 'PUNSUBSCRIBE'; }
+    public function getId() {
+        return 'PUNSUBSCRIBE';
+    }
+
+    protected function canBeHashed() {
+        return false;
+    }
 }

Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden.