diff --git a/src/AbraFlexi/RO.php b/src/AbraFlexi/RO.php index b47de4e1..f828ea58 100644 --- a/src/AbraFlexi/RO.php +++ b/src/AbraFlexi/RO.php @@ -368,14 +368,6 @@ public function __construct($init = null, $options = []) $this->setObjectName(\array_key_exists('objectName', $options) ? $options['objectName'] : null); } - /** - * Disconnect CURL before pass away. - */ - public function __destruct() - { - $this->disconnect(); - } - /** * Obtain record/object identificator code: or id: * @@ -1489,24 +1481,11 @@ public function setAction(string $action) return $result; } - /** - * Disconnect from AbraFlexi. - */ - public function disconnect(): void - { - if ((null === $this->curl) === false) { - curl_close($this->curl); - } - - $this->curl = null; - } - /** * Reset Curl Connection. */ public function connectionReset(): void { - $this->disconnect(); $this->curlInit(); } @@ -1888,7 +1867,7 @@ public function getSumsFromAbraFlexi( * Return columns from AbraFlexi according to conditions. * * @param array|string $columnsList List of items or detail level: id|summary|full - * @param array $conditions Array of conditions or record ID + * @param array $conditions Array of conditions or record ID * @param null|string $indexBy Column by which to index records * * @return null|array> Records @@ -2158,7 +2137,7 @@ public function getExternalID($want = null) { $ids = (array) $this->getExternalIDs(); - return \array_key_exists($want, $ids) ? $ids[$want] : current($ids); + return $want !== null && \array_key_exists($want, $ids) ? $ids[$want] : current($ids); } /** diff --git a/tests/src/AbraFlexi/ROTest.php b/tests/src/AbraFlexi/ROTest.php index 79ff8dd1..ea1792c0 100644 --- a/tests/src/AbraFlexi/ROTest.php +++ b/tests/src/AbraFlexi/ROTest.php @@ -532,18 +532,6 @@ protected function tearDown(): void // } // // /** - // * @covers \AbraFlexi\RO::disconnect - // * - // * @todo Implement testdisconnect(). - // */ - // public function testdisconnect(): void - // { - // $this->assertEquals('', $this->object->disconnect()); - // // Remove the following lines when you implement this test. - // $this->markTestIncomplete('This test has not been implemented yet.'); - // } - // - // /** // * @covers \AbraFlexi\RO::connectionReset // * // * @todo Implement testconnectionReset().