src/Variables/Specific/AbstractReadOnly.php
protected function getDefault(int $type = Variables::TYPE_STRING)
    {
        switch ($type) {
            case Variables::TYPE_INT:
                $value = (int)0;
                break;
            case Variables::TYPE_FLOAT:
                $value = (float)0;
                break;
            case Variables::TYPE_STRING:
                $value = '';
                break;
            case Variables::TYPE_ARRAY:
                $value = [];
                break;
            case Variables::TYPE_JSON_DECODED:
                $value = '';
                break;
            case Variables::TYPE_AUTO:
                $value = '';
                break;
            default:
                throw new DomainException('Invalid variable type specified');
                break;
        }
        return $value;
    }
protected function getDefault(int $type = Variables::TYPE_STRING)
    {
        switch ($type) {
            case Variables::TYPE_INT:
                $value = (int)0;
                break;
            case Variables::TYPE_FLOAT:
                $value = (float)0;
                break;
            case Variables::TYPE_STRING:
                $value = '';
                break;
            case Variables::TYPE_ARRAY:
                $value = [];
                break;
            case Variables::TYPE_JSON_DECODED:
                $value = '';
                break;
            case Variables::TYPE_AUTO:
                $value = '';
                break;
            default:
                throw new DomainException('Invalid variable type specified');
                break;
        }
        return $value;
    }
protected function getDefault ( int $ type = Variables :: TYPE_STRING ) { switch ( $ type ) { case Variables :: TYPE_INT : $ value = ( int ) 0 ; break ; case Variables :: TYPE_FLOAT : $ value = ( float ) 0 ; break ; case Variables :: TYPE_STRING : $ value = '' ; break ; case Variables :: TYPE_ARRAY : $ value = [ ] ; break ; case Variables :: TYPE_JSON_DECODED : $ value = '' ; break ; case Variables :: TYPE_AUTO : $ value = '' ; break ; default : throw new DomainException ( 'Invalid variable type specified' ) ; break ; } return $ value ; }
Returns default value for specified type

@param int $type
@return array|float|int|string
Returns default value for specified type