Browse Source

Correctly mark methods as not implemented

Andreas Braun 10 năm trước cách đây
mục cha
commit
385b1ab8c8
1 tập tin đã thay đổi với 7 bổ sung2 xóa
  1. 7 2
      lib/Mongo/MongoClient.php

+ 7 - 2
lib/Mongo/MongoClient.php

@@ -220,7 +220,7 @@ class MongoClient
      */
     public function killCursor($server_hash , $id)
     {
-        throw new \Exception('Not implemented');
+        $this->notImplemented();
     }
 
     /**
@@ -299,7 +299,7 @@ class MongoClient
      */
     public function switchSlave()
     {
-        return $this->server;
+        $this->notImplemented();
     }
 
     /**
@@ -321,5 +321,10 @@ class MongoClient
         $command = new \MongoDB\Driver\Command(['ping' => 1]);
         $this->manager->executeCommand('db', $command);
     }
+
+    private function notImplemented()
+    {
+        throw new \Exception('Not implemented');
+    }
 }