public static function assert($value, $varName) {
        if(!is_array($value)) return Exceptions::InvalidTypeException('HashMap', $varName, $value);
        foreach($value as $key => $v) HashMapEntry::assert([$key => $v], $varName);

        return $value;
    }
public static function assert($value, $varName) {
        if(!is_array($value)) return Exceptions::InvalidTypeException('HashMap', $varName, $value);
        foreach($value as $key => $v) HashMapEntry::assert([$key => $v], $varName);

        return $value;
    }
public static function assert ( $ value , $ varName ) { if ( ! is_array ( $ value ) ) return Exceptions :: InvalidTypeException ( 'HashMap' , $ varName , $ value ) ; foreach ( $ value as $ key => $ v ) HashMapEntry :: assert ( [ $ key => $ v ] , $ varName ) ; return $ value ; }
Asserts if the given value is a hash map

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

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