original_string: public function getIp(): string
      {
          if ($this->ip === null) {
              foreach (["HTTP_X_FORWARDED_FOR", "X_FORWARDED_FOR"] as $key) {
                  $proxyIpList = $this->environment[$key] ?? "";
                  if ($proxyIpList) {
                      $commaPosition = strpos($proxyIpList, ",");
                      if ($commaPosition !== false) {
                          $this->ip = substr($proxyIpList, 0, $commaPosition);
                      } else {
                          $this->ip = $proxyIpList;
                      }
                      return $this->ip;
                  }
              }
              $this->ip = $this->environment["REMOTE_ADDR"] ?? "";
          }
          return $this->ip;
      }
code: public function getIp(): string
      {
          if ($this->ip === null) {
              foreach (["HTTP_X_FORWARDED_FOR", "X_FORWARDED_FOR"] as $key) {
                  $proxyIpList = $this->environment[$key] ?? "";
                  if ($proxyIpList) {
                      $commaPosition = strpos($proxyIpList, ",");
                      if ($commaPosition !== false) {
                          $this->ip = substr($proxyIpList, 0, $commaPosition);
                      } else {
                          $this->ip = $proxyIpList;
                      }
                      return $this->ip;
                  }
              }
              $this->ip = $this->environment["REMOTE_ADDR"] ?? "";
          }
          return $this->ip;
      }
code_tokens: public function getIp ( ) : string { if ( $ this -> ip === null ) { foreach ( [ "HTTP_X_FORWARDED_FOR" , "X_FORWARDED_FOR" ] as $ key ) { $ proxyIpList = $ this -> environment [ $ key ] ?? "" ; if ( $ proxyIpList ) { $ commaPosition = strpos ( $ proxyIpList , "," ) ; if ( $ commaPosition !== false ) { $ this -> ip = substr ( $ proxyIpList , 0 , $ commaPosition ) ; } else { $ this -> ip = $ proxyIpList ; } return $ this -> ip ; } } $ this -> ip = $ this -> environment [ "REMOTE_ADDR" ] ?? "" ; } return $ this -> ip ; }
docstring: Retrieve the client ip address
  
  @return string
docstring_tokens: Retrieve the client ip address