src/Api/TypeCatalog.php
public function getDefault(string $type)
    {
        switch ($type) {
            case self::TYPE_NULL:
                return null;
            case self::TYPE_BOOLEAN:
                return false;
            case self::TYPE_INTEGER:
            case self::TYPE_FLOAT:
                return 0;
            case self::TYPE_STRING:
            case self::TYPE_BINARY:
                return '';
            case self::TYPE_ARRAY:
            case self::TYPE_OBJECT:
                return [];
        }

        throw new InvalidValueException("Invalid value type: $type");
    }
public function getDefault(string $type)
    {
        switch ($type) {
            case self::TYPE_NULL:
                return null;
            case self::TYPE_BOOLEAN:
                return false;
            case self::TYPE_INTEGER:
            case self::TYPE_FLOAT:
                return 0;
            case self::TYPE_STRING:
            case self::TYPE_BINARY:
                return '';
            case self::TYPE_ARRAY:
            case self::TYPE_OBJECT:
                return [];
        }

        throw new InvalidValueException("Invalid value type: $type");
    }
public function getDefault ( string $ type ) { switch ( $ type ) { case self :: TYPE_NULL : return null ; case self :: TYPE_BOOLEAN : return false ; case self :: TYPE_INTEGER : case self :: TYPE_FLOAT : return 0 ; case self :: TYPE_STRING : case self :: TYPE_BINARY : return '' ; case self :: TYPE_ARRAY : case self :: TYPE_OBJECT : return [ ] ; } throw new InvalidValueException ( "Invalid value type: $type" ) ; }
Return the default value for a given type.

@param string $type
@return mixed
@throws InvalidValueException
Return the default value for a given type .