Clean up usage of is_countable()

This commit is contained in:
Kijin Sung 2020-06-08 20:35:54 +09:00
parent 67a9aba082
commit 494e0ee028
8 changed files with 10 additions and 14 deletions

View file

@ -500,7 +500,7 @@ class Context
{
$config = Rhymix\Framework\Config::getAll();
}
if (!is_countable($config) || !count($config))
if (!is_array($config) || !count($config))
{
self::$_instance->db_info = self::$_instance->db_info ?: new stdClass;
return;

View file

@ -902,7 +902,7 @@ class DB
*/
public function _dbInfoExists()
{
return ($this->master_db && (is_countable($this->slave_db) && count($this->slave_db)));
return $this->master_db ? true : false;
}
/**

View file

@ -149,8 +149,8 @@ class Query extends BaseObject
function setColumnList($columnList)
{
if (!is_array($this->columnList)) return;
$this->columnList = $columnList;
if (!is_countable($this->columnList)) return;
if(count($this->columnList) > 0)
{

View file

@ -60,10 +60,6 @@ class JSONDisplayHandler
*/
protected static function _isNumericArray($array)
{
if (!is_countable($array))
{
return false;
}
if (!is_array($array) || !count($array))
{
return false;