Drop List::getSingleItem as it is not used

Signed-off-by: Michal Čihař <michal@cihar.com>
This commit is contained in:
Michal Čihař 2014-03-14 07:29:15 +01:00
parent 4d006c3717
commit a2d84745d2
2 changed files with 0 additions and 25 deletions

View File

@ -41,20 +41,6 @@ abstract class PMA_List extends ArrayObject
parent::__construct($array, $flags, $iterator_class);
}
/**
* returns item only if there is only one in the list
*
* @return PMA_List single item
*/
public function getSingleItem()
{
if (count($this) === 1) {
return reset($this);
}
return $this->getEmpty();
}
/**
* defines what is an empty item (0, '', false or null)
*

View File

@ -58,17 +58,6 @@ class PMA_List_Database_Test extends PHPUnit_Framework_TestCase
$this->assertEquals('', $arr->getEmpty());
}
/**
* Test for PMA_List_Database::getSingleItem
*
* @return void
*/
public function testSingle()
{
$arr = new PMA_List_Database;
$this->assertEquals('single_db', $arr->getSingleItem());
}
/**
* Test for PMA_List_Database::exists
*