public static function assert($value, $varName) {
        if(!is_array($value)) return Exceptions::InvalidTypeException('HashMapEntry', $varName, $value);
        if(count($value) > 1) return Exceptions::InvalidTypeException('HashMapEntry', $varName, $value);

        $keys = array_keys($value);
        $key  = end($keys);

        Str::assert($key, 'HashMapEntry of "' . $varName . '": "' . $key . '"');

        return $value;
    }
public static function assert($value, $varName) {
        if(!is_array($value)) return Exceptions::InvalidTypeException('HashMapEntry', $varName, $value);
        if(count($value) > 1) return Exceptions::InvalidTypeException('HashMapEntry', $varName, $value);

        $keys = array_keys($value);
        $key  = end($keys);

        Str::assert($key, 'HashMapEntry of "' . $varName . '": "' . $key . '"');

        return $value;
    }
public static function assert ( $ value , $ varName ) { if ( ! is_array ( $ value ) ) return Exceptions :: InvalidTypeException ( 'HashMapEntry' , $ varName , $ value ) ; if ( count ( $ value ) > 1 ) return Exceptions :: InvalidTypeException ( 'HashMapEntry' , $ varName , $ value ) ; $ keys = array_keys ( $ value ) ; $ key = end ( $ keys ) ; Str :: assert ( $ key , 'HashMapEntry of "' . $ varName . '": "' . $ key . '"' ) ; return $ value ; }
Asserts if the given value is a hash map entry

@param  mixed  $value
@param  string $varName
@return mixed
@throws InvalidTypeException

@SuppressWarnings("PHPMD.StaticAccess")
Asserts if the given value is a hash map entry