Эх сурвалжийг харах

Remove Predis\RedisServerProfile::compareWith() since it is useless and it is broken anyway.

Daniele Alessandri 15 жил өмнө
parent
commit
5757318c9b
1 өөрчлөгдсөн 0 нэмэгдсэн , 12 устгасан
  1. 0 12
      lib/Predis.php

+ 0 - 12
lib/Predis.php

@@ -1377,18 +1377,6 @@ abstract class RedisServerProfile {
         return new $profile();
     }
 
-    public function compareWith($version, $operator = null) {
-        // one could expect that PHP's version_compare would behave 
-        // the same way if invoked with 2 arguments or 3 arguments 
-        // with the third being NULL, but it is not like that.
-        // TODO: since version_compare considers 1 < 1.0 < 1.0.0, 
-        //       we might need to revise the behavior of this method.
-        return ($operator === null 
-            ? version_compare($this, $version)
-            : version_compare($this, $version, $operator)
-        );
-    }
-
     public function supportsCommand($command) {
         return isset($this->_registeredCommands[$command]);
     }