protected function flattenList($value)
    {
        if ($value[0] === Type::T_LIST && count($value[2]) === 1) {
            return $this->flattenList($value[2][0]);
        }

        return $value;
    }
protected function flattenList($value)
    {
        if ($value[0] === Type::T_LIST && count($value[2]) === 1) {
            return $this->flattenList($value[2][0]);
        }

        return $value;
    }
protected function flattenList ( $ value ) { if ( $ value [ 0 ] === Type :: T_LIST && count ( $ value [ 2 ] ) === 1 ) { return $ this -> flattenList ( $ value [ 2 ] [ 0 ] ) ; } return $ value ; }
Turn list of length 1 into value type

@param array $value

@return array
Turn list of length 1 into value type