/** * Invoke * @return string|null */ public function __invoke() { return $this->ipService->getIp(); }
/** * Return detected IP address * @return string */ public function __toString() { $ip = $this->ipService->getIp(); return null === $ip ? '' : $ip; }