Tidying and doc fixes
This commit is contained in:
parent
234dcaff7c
commit
e03b9558a9
|
@ -17,7 +17,7 @@ class HttpException extends GeoIp2Exception
|
||||||
$message,
|
$message,
|
||||||
$httpStatus,
|
$httpStatus,
|
||||||
$uri,
|
$uri,
|
||||||
Exception $previous = null
|
\Exception $previous = null
|
||||||
) {
|
) {
|
||||||
$this->uri = $uri;
|
$this->uri = $uri;
|
||||||
parent::__construct($message, $httpStatus, $previous);
|
parent::__construct($message, $httpStatus, $previous);
|
||||||
|
|
|
@ -18,7 +18,7 @@ class InvalidRequestException extends HttpException
|
||||||
$error,
|
$error,
|
||||||
$httpStatus,
|
$httpStatus,
|
||||||
$uri,
|
$uri,
|
||||||
Exception $previous = null
|
\Exception $previous = null
|
||||||
) {
|
) {
|
||||||
$this->error = $error;
|
$this->error = $error;
|
||||||
parent::__construct($message, $httpStatus, $uri, $previous);
|
parent::__construct($message, $httpStatus, $uri, $previous);
|
||||||
|
|
|
@ -7,28 +7,28 @@ interface ProviderInterface
|
||||||
/**
|
/**
|
||||||
* @param ipAddress
|
* @param ipAddress
|
||||||
* IPv4 or IPv6 address to lookup.
|
* IPv4 or IPv6 address to lookup.
|
||||||
* @return A Country model for the requested IP address.
|
* @return \GeoIp2\Model\Country A Country model for the requested IP address.
|
||||||
*/
|
*/
|
||||||
public function country($ipAddress);
|
public function country($ipAddress);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param ipAddress
|
* @param ipAddress
|
||||||
* IPv4 or IPv6 address to lookup.
|
* IPv4 or IPv6 address to lookup.
|
||||||
* @return A City model for the requested IP address.
|
* @return \GeoIp2\Model\City A City model for the requested IP address.
|
||||||
*/
|
*/
|
||||||
public function city($ipAddress);
|
public function city($ipAddress);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param ipAddress
|
* @param ipAddress
|
||||||
* IPv4 or IPv6 address to lookup.
|
* IPv4 or IPv6 address to lookup.
|
||||||
* @return A CityIspOrg model for the requested IP address.
|
* @return \GeoIp2\Model\CityIspOrg A CityIspOrg model for the requested IP address.
|
||||||
*/
|
*/
|
||||||
public function cityIspOrg($ipAddress);
|
public function cityIspOrg($ipAddress);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param ipAddress
|
* @param ipAddress
|
||||||
* IPv4 or IPv6 address to lookup.
|
* IPv4 or IPv6 address to lookup.
|
||||||
* @return An Omni model for the requested IP address.
|
* @return \GeoIp2\Model\Omni An Omni model for the requested IP address.
|
||||||
*/
|
*/
|
||||||
public function omni($ipAddress);
|
public function omni($ipAddress);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,15 +2,15 @@
|
||||||
|
|
||||||
namespace GeoIp2\WebService;
|
namespace GeoIp2\WebService;
|
||||||
|
|
||||||
use GeoIp2\Exception\GeoIp2Exception;
|
|
||||||
use GeoIp2\Exception\HttpException;
|
|
||||||
use GeoIp2\Exception\AddressNotFoundException;
|
use GeoIp2\Exception\AddressNotFoundException;
|
||||||
use GeoIp2\Exception\AuthenticationException;
|
use GeoIp2\Exception\AuthenticationException;
|
||||||
|
use GeoIp2\Exception\GeoIp2Exception;
|
||||||
|
use GeoIp2\Exception\HttpException;
|
||||||
use GeoIp2\Exception\InvalidRequestException;
|
use GeoIp2\Exception\InvalidRequestException;
|
||||||
use GeoIp2\Exception\OutOfQueriesException;
|
use GeoIp2\Exception\OutOfQueriesException;
|
||||||
use GeoIp2\ProviderInterface;
|
use GeoIp2\ProviderInterface;
|
||||||
use Guzzle\Http\Client as GuzzleClient;
|
|
||||||
use Guzzle\Common\Exception\RuntimeException;
|
use Guzzle\Common\Exception\RuntimeException;
|
||||||
|
use Guzzle\Http\Client as GuzzleClient;
|
||||||
use Guzzle\Http\Exception\ClientErrorResponseException;
|
use Guzzle\Http\Exception\ClientErrorResponseException;
|
||||||
use Guzzle\Http\Exception\ServerErrorResponseException;
|
use Guzzle\Http\Exception\ServerErrorResponseException;
|
||||||
|
|
||||||
|
@ -258,8 +258,6 @@ class Client implements ProviderInterface
|
||||||
{
|
{
|
||||||
$status = $response->getStatusCode();
|
$status = $response->getStatusCode();
|
||||||
|
|
||||||
$body = array();
|
|
||||||
|
|
||||||
if ($response->getContentLength() > 0) {
|
if ($response->getContentLength() > 0) {
|
||||||
if (strstr($response->getContentType(), 'json')) {
|
if (strstr($response->getContentType(), 'json')) {
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user