public function applyDefaultValue()
    {
        parent::applyDefaultValue();

        if (is_null($this->getDefaultValue()) === true && $this->getCardinality() === Cardinality::SINGLE) {
            if ($this->getBaseType() === BaseType::INTEGER) {
                $this->setValue(new QtiInteger(0));
            } elseif ($this->getBaseType() === BaseType::FLOAT) {
                $this->setValue(new QtiFloat(0.0));
            }
        }
    }
public function applyDefaultValue()
    {
        parent::applyDefaultValue();

        if (is_null($this->getDefaultValue()) === true && $this->getCardinality() === Cardinality::SINGLE) {
            if ($this->getBaseType() === BaseType::INTEGER) {
                $this->setValue(new QtiInteger(0));
            } elseif ($this->getBaseType() === BaseType::FLOAT) {
                $this->setValue(new QtiFloat(0.0));
            }
        }
    }
public function applyDefaultValue ( ) { parent :: applyDefaultValue ( ) ; if ( is_null ( $ this -> getDefaultValue ( ) ) === true && $ this -> getCardinality ( ) === Cardinality :: SINGLE ) { if ( $ this -> getBaseType ( ) === BaseType :: INTEGER ) { $ this -> setValue ( new QtiInteger ( 0 ) ) ; } elseif ( $ this -> getBaseType ( ) === BaseType :: FLOAT ) { $ this -> setValue ( new QtiFloat ( 0.0 ) ) ; } } }
Apply the default value to the OutcomeVariable.

If no default value is described, and the cardinality is single and the baseType
is integer or float, the value of the variable becomes 0.
Apply the default value to the OutcomeVariable .