Permalink
Browse files

Run php-cs-fixer to fix failures in travis

  • Loading branch information...
andyjack committed Sep 19, 2018
1 parent becdb94 commit 6dc4eb468014f59ec637e42a377d7d3ee26f8577
View
@@ -245,7 +245,7 @@ private function getRecord($class, $type, $ipAddress)
"The address $ipAddress is not in the database."
);
}
if (!is_array($record)) {
if (!\is_array($record)) {
// This can happen on corrupt databases. Generally,
// MaxMind\Db\Reader will throw a
// MaxMind\Db\Reader\InvalidDatabaseException, but occasionally
@@ -255,7 +255,7 @@ private function getRecord($class, $type, $ipAddress)
// exceptions go unnoticed.
throw new InvalidDatabaseException(
"Expected an array when looking up $ipAddress but received: "
. gettype($record)
. \gettype($record)
);
}
@@ -51,7 +51,7 @@ private function attributeToKey($attr)
private function validAttribute($attr)
{
return in_array($attr, $this->validAttributes, true);
return \in_array($attr, $this->validAttributes, true);
}
public function jsonSerialize()
@@ -74,7 +74,7 @@ public function __construct(
// This is for backwards compatibility. Do not remove except for a
// major version bump.
if (is_string($options)) {
if (\is_string($options)) {
$options = ['host' => $options];
}
@@ -111,7 +111,7 @@ private function userAgent()
* @throws \GeoIp2\Exception\HttpException if an unexpected HTTP error code or message was returned.
* This could indicate a problem with the connection between
* your server and the web service or that the web service
* returned an invalid document or 500 error code.
* returned an invalid document or 500 error code
* @throws \GeoIp2\Exception\GeoIp2Exception This serves as the parent
* class to the above exceptions. It will be thrown directly
* if a 200 status code is returned but the body is invalid.
@@ -173,7 +173,7 @@ public function country($ipAddress = 'me')
* @throws \GeoIp2\Exception\HttpException if an unexpected HTTP error code or message was returned.
* This could indicate a problem with the connection between
* your server and the web service or that the web service
* returned an invalid document or 500 error code.
* returned an invalid document or 500 error code
* @throws \GeoIp2\Exception\GeoIp2Exception This serves as the parent
* class to the above exceptions. It will be thrown directly
* if a 200 status code is returned but the body is invalid.
@@ -424,11 +424,11 @@ private function response(
if ($bad) {
$body = '{ invalid: }';
} elseif (is_array($body)) {
} elseif (\is_array($body)) {
$body = json_encode($body);
}
$headers['Content-Length'] = strlen($body);
$headers['Content-Length'] = \strlen($body);
return [$status, $headers, $body];
}

0 comments on commit 6dc4eb4

Please sign in to comment.