Drop List::getSingleItem as it is not used
Signed-off-by: Michal Čihař <michal@cihar.com>
This commit is contained in:
parent
4d006c3717
commit
a2d84745d2
@ -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)
|
||||
*
|
||||
|
||||
@ -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
|
||||
*
|
||||
|
||||
Loading…
Reference in New Issue
Block a user