public function setPropertyDefaultValue($property)
    {
        if (isset($property->default)) {
            // Use the defined default.
            return true;
        } elseif (isset($property->enum) && count($property->enum) == 1) {
            // Set default to single enum.
            $property->default = reset($property->enum);

            return true;
        }

        return false;
    }
public function setPropertyDefaultValue($property)
    {
        if (isset($property->default)) {
            // Use the defined default.
            return true;
        } elseif (isset($property->enum) && count($property->enum) == 1) {
            // Set default to single enum.
            $property->default = reset($property->enum);

            return true;
        }

        return false;
    }
public function setPropertyDefaultValue ( $ property ) { if ( isset ( $ property -> default ) ) { // Use the defined default. return true ; } elseif ( isset ( $ property -> enum ) && count ( $ property -> enum ) == 1 ) { // Set default to single enum. $ property -> default = reset ( $ property -> enum ) ; return true ; } return false ; }
Set the default value for the property schema.

@param object $property The property JSON object.

@return bool True if the default is set.
Set the default value for the property schema .