diff --git a/src/Riak.php b/src/Riak.php index 113f799..a076189 100644 --- a/src/Riak.php +++ b/src/Riak.php @@ -67,13 +67,6 @@ class Riak 'max_connect_attempts' => 3, ]; - /** - * Unique id for this client connection - * - * @var string - */ - protected $clientId = ''; - /** * The actively connected Riak Node from the ring * @@ -99,8 +92,6 @@ class Riak */ public function __construct(array $nodes, array $config = [], Api $api = NULL) { - $this->clientId = 'php_' . base_convert(mt_rand(), 10, 36); - // wash any custom keys if any $this->nodes = array_values($nodes); $this->setActiveNodeIndex($this->pickNode()); @@ -114,7 +105,7 @@ public function __construct(array $nodes, array $config = [], Api $api = NULL) $this->api = $api; } else { // default to HTTP bridge class - $this->api = new Http($this->getClientID(), $this->config); + $this->api = new Http($this->config); } } @@ -165,14 +156,6 @@ public function getConfigValue($key) return $this->config[$key]; } - /** - * @return string - */ - public function getClientID() - { - return $this->clientId; - } - /** * @return array */ diff --git a/src/Riak/Api.php b/src/Riak/Api.php index a4822e5..0c9a237 100644 --- a/src/Riak/Api.php +++ b/src/Riak/Api.php @@ -69,17 +69,14 @@ abstract class Api */ protected $node = null; - protected $clientId = ''; - protected $success = null; protected $error = ''; protected $config = []; - public function __construct($clientId, array $config = []) + public function __construct(array $config = []) { - $this->clientId = $clientId; $this->config = $config; } @@ -91,14 +88,6 @@ public function getError() return $this->error; } - /** - * @return string - */ - public function getClientId() - { - return $this->clientId; - } - /** * @return int */ diff --git a/tests/unit/RiakTest.php b/tests/unit/RiakTest.php index ac97b25..f6c4bfc 100644 --- a/tests/unit/RiakTest.php +++ b/tests/unit/RiakTest.php @@ -39,18 +39,6 @@ public function testNodeCount($nodes) $this->assertEquals(count($riak->getNodes()), count($nodes)); } - /** - * @dataProvider getCluster - * - * @param $nodes array - */ - public function testClientId($nodes) - { - $riak = new Riak($nodes); - $this->assertNotEmpty($riak->getClientID()); - $this->assertRegExp('/^php_([a-z0-9])+$/', $riak->getClientID()); - } - /** * @dataProvider getCluster *