Просмотр исходного кода

Correctly mark methods as not implemented

Andreas Braun 10 лет назад
Родитель
Сommit
385b1ab8c8
1 измененных файлов с 7 добавлено и 2 удалено
  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');
+    }
 }