Datastore/src/EntityMapper.php
private function getValueType(array $value)
    {
        $keys = array_keys($value);
        $types = array_values(array_filter($keys, function ($key) {
            return strpos($key, 'Value') !== false;
        }));

        if (!empty($types)) {
            return $types[0];
        }

        throw new \RuntimeException('Invalid entity property value given');
    }
private function getValueType(array $value)
    {
        $keys = array_keys($value);
        $types = array_values(array_filter($keys, function ($key) {
            return strpos($key, 'Value') !== false;
        }));

        if (!empty($types)) {
            return $types[0];
        }

        throw new \RuntimeException('Invalid entity property value given');
    }
private function getValueType ( array $ value ) { $ keys = array_keys ( $ value ) ; $ types = array_values ( array_filter ( $ keys , function ( $ key ) { return strpos ( $ key , 'Value' ) !== false ; } ) ) ; if ( ! empty ( $ types ) ) { return $ types [ 0 ] ; } throw new \ RuntimeException ( 'Invalid entity property value given' ) ; }
Get the value type from a value object.

@param array $value
@return string
@throws RuntimeException
Get the value type from a value object .