protected function preparePropertyDefinitionData(array $data)
    {
        $data[JSONConstants::JSON_PROPERTY_TYPE_PROPERTY_TYPE] = PropertyType::cast(
            $data[JSONConstants::JSON_PROPERTY_TYPE_PROPERTY_TYPE]
        );

        if (isset($data[JSONConstants::JSON_PROPERTY_TYPE_DEAULT_VALUE])) {
            $data[JSONConstants::JSON_PROPERTY_TYPE_DEAULT_VALUE]
                = (array) $data[JSONConstants::JSON_PROPERTY_TYPE_DEAULT_VALUE];
        }

        if (isset($data[JSONConstants::JSON_PROPERTY_TYPE_RESOLUTION])) {
            $data[JSONConstants::JSON_PROPERTY_TYPE_RESOLUTION] = DateTimeResolution::cast(
                $data[JSONConstants::JSON_PROPERTY_TYPE_RESOLUTION]
            );
        }

        if (isset($data[JSONConstants::JSON_PROPERTY_TYPE_PRECISION])) {
            $data[JSONConstants::JSON_PROPERTY_TYPE_PRECISION] = DecimalPrecision::cast(
                $data[JSONConstants::JSON_PROPERTY_TYPE_PRECISION]
            );
        }

        if (isset($data[JSONConstants::JSON_PROPERTY_TYPE_CARDINALITY])) {
            $data[JSONConstants::JSON_PROPERTY_TYPE_CARDINALITY] = Cardinality::cast(
                $data[JSONConstants::JSON_PROPERTY_TYPE_CARDINALITY]
            );
        }

        if (isset($data[JSONConstants::JSON_PROPERTY_TYPE_UPDATABILITY])) {
            $data[JSONConstants::JSON_PROPERTY_TYPE_UPDATABILITY] = Updatability::cast(
                $data[JSONConstants::JSON_PROPERTY_TYPE_UPDATABILITY]
            );
        }

        return $data;
    }
protected function preparePropertyDefinitionData(array $data)
    {
        $data[JSONConstants::JSON_PROPERTY_TYPE_PROPERTY_TYPE] = PropertyType::cast(
            $data[JSONConstants::JSON_PROPERTY_TYPE_PROPERTY_TYPE]
        );

        if (isset($data[JSONConstants::JSON_PROPERTY_TYPE_DEAULT_VALUE])) {
            $data[JSONConstants::JSON_PROPERTY_TYPE_DEAULT_VALUE]
                = (array) $data[JSONConstants::JSON_PROPERTY_TYPE_DEAULT_VALUE];
        }

        if (isset($data[JSONConstants::JSON_PROPERTY_TYPE_RESOLUTION])) {
            $data[JSONConstants::JSON_PROPERTY_TYPE_RESOLUTION] = DateTimeResolution::cast(
                $data[JSONConstants::JSON_PROPERTY_TYPE_RESOLUTION]
            );
        }

        if (isset($data[JSONConstants::JSON_PROPERTY_TYPE_PRECISION])) {
            $data[JSONConstants::JSON_PROPERTY_TYPE_PRECISION] = DecimalPrecision::cast(
                $data[JSONConstants::JSON_PROPERTY_TYPE_PRECISION]
            );
        }

        if (isset($data[JSONConstants::JSON_PROPERTY_TYPE_CARDINALITY])) {
            $data[JSONConstants::JSON_PROPERTY_TYPE_CARDINALITY] = Cardinality::cast(
                $data[JSONConstants::JSON_PROPERTY_TYPE_CARDINALITY]
            );
        }

        if (isset($data[JSONConstants::JSON_PROPERTY_TYPE_UPDATABILITY])) {
            $data[JSONConstants::JSON_PROPERTY_TYPE_UPDATABILITY] = Updatability::cast(
                $data[JSONConstants::JSON_PROPERTY_TYPE_UPDATABILITY]
            );
        }

        return $data;
    }
protected function preparePropertyDefinitionData ( array $ data ) { $ data [ JSONConstants :: JSON_PROPERTY_TYPE_PROPERTY_TYPE ] = PropertyType :: cast ( $ data [ JSONConstants :: JSON_PROPERTY_TYPE_PROPERTY_TYPE ] ) ; if ( isset ( $ data [ JSONConstants :: JSON_PROPERTY_TYPE_DEAULT_VALUE ] ) ) { $ data [ JSONConstants :: JSON_PROPERTY_TYPE_DEAULT_VALUE ] = ( array ) $ data [ JSONConstants :: JSON_PROPERTY_TYPE_DEAULT_VALUE ] ; } if ( isset ( $ data [ JSONConstants :: JSON_PROPERTY_TYPE_RESOLUTION ] ) ) { $ data [ JSONConstants :: JSON_PROPERTY_TYPE_RESOLUTION ] = DateTimeResolution :: cast ( $ data [ JSONConstants :: JSON_PROPERTY_TYPE_RESOLUTION ] ) ; } if ( isset ( $ data [ JSONConstants :: JSON_PROPERTY_TYPE_PRECISION ] ) ) { $ data [ JSONConstants :: JSON_PROPERTY_TYPE_PRECISION ] = DecimalPrecision :: cast ( $ data [ JSONConstants :: JSON_PROPERTY_TYPE_PRECISION ] ) ; } if ( isset ( $ data [ JSONConstants :: JSON_PROPERTY_TYPE_CARDINALITY ] ) ) { $ data [ JSONConstants :: JSON_PROPERTY_TYPE_CARDINALITY ] = Cardinality :: cast ( $ data [ JSONConstants :: JSON_PROPERTY_TYPE_CARDINALITY ] ) ; } if ( isset ( $ data [ JSONConstants :: JSON_PROPERTY_TYPE_UPDATABILITY ] ) ) { $ data [ JSONConstants :: JSON_PROPERTY_TYPE_UPDATABILITY ] = Updatability :: cast ( $ data [ JSONConstants :: JSON_PROPERTY_TYPE_UPDATABILITY ] ) ; } return $ data ; }
Cast data values to the expected type

@param array $data
@return array
Cast data values to the expected type