/**
* Checks an ip for part of the tor network
*
* @param $ip string Ip Address
* @return EnumSet contains no elements if the ip is not part of the tor network
*/
public function torCheckIp($ip)
{
$errors = new EnumSet('TuxCoder\\TorInfoBundle\\Enum\\TorIpCheck');
if (!$this->reverseDomainCheck($ip)) {
$errors->attach(TorIpCheck::REVERSE_DNS_ERROR);
}
if (!$this->ExitAddressCheck($ip)) {
$errors->attach(TorIpCheck::TOR_EXIT_ADDRESS_LIST);
}
return $errors;
}