Skip to content

Commit 6dc4eb4

Browse files
committed
Run php-cs-fixer to fix failures in travis
1 parent becdb94 commit 6dc4eb4

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

src/Database/Reader.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ private function getRecord($class, $type, $ipAddress)
245245
"The address $ipAddress is not in the database."
246246
);
247247
}
248-
if (!is_array($record)) {
248+
if (!\is_array($record)) {
249249
// This can happen on corrupt databases. Generally,
250250
// MaxMind\Db\Reader will throw a
251251
// MaxMind\Db\Reader\InvalidDatabaseException, but occasionally
@@ -255,7 +255,7 @@ private function getRecord($class, $type, $ipAddress)
255255
// exceptions go unnoticed.
256256
throw new InvalidDatabaseException(
257257
"Expected an array when looking up $ipAddress but received: "
258-
. gettype($record)
258+
. \gettype($record)
259259
);
260260
}
261261

src/Record/AbstractRecord.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ private function attributeToKey($attr)
5151

5252
private function validAttribute($attr)
5353
{
54-
return in_array($attr, $this->validAttributes, true);
54+
return \in_array($attr, $this->validAttributes, true);
5555
}
5656

5757
public function jsonSerialize()

src/WebService/Client.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public function __construct(
7474

7575
// This is for backwards compatibility. Do not remove except for a
7676
// major version bump.
77-
if (is_string($options)) {
77+
if (\is_string($options)) {
7878
$options = ['host' => $options];
7979
}
8080

@@ -111,7 +111,7 @@ private function userAgent()
111111
* @throws \GeoIp2\Exception\HttpException if an unexpected HTTP error code or message was returned.
112112
* This could indicate a problem with the connection between
113113
* your server and the web service or that the web service
114-
* returned an invalid document or 500 error code.
114+
* returned an invalid document or 500 error code
115115
* @throws \GeoIp2\Exception\GeoIp2Exception This serves as the parent
116116
* class to the above exceptions. It will be thrown directly
117117
* if a 200 status code is returned but the body is invalid.
@@ -173,7 +173,7 @@ public function country($ipAddress = 'me')
173173
* @throws \GeoIp2\Exception\HttpException if an unexpected HTTP error code or message was returned.
174174
* This could indicate a problem with the connection between
175175
* your server and the web service or that the web service
176-
* returned an invalid document or 500 error code.
176+
* returned an invalid document or 500 error code
177177
* @throws \GeoIp2\Exception\GeoIp2Exception This serves as the parent
178178
* class to the above exceptions. It will be thrown directly
179179
* if a 200 status code is returned but the body is invalid.

tests/GeoIp2/Test/WebService/ClientTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -424,11 +424,11 @@ private function response(
424424

425425
if ($bad) {
426426
$body = '{ invalid: }';
427-
} elseif (is_array($body)) {
427+
} elseif (\is_array($body)) {
428428
$body = json_encode($body);
429429
}
430430

431-
$headers['Content-Length'] = strlen($body);
431+
$headers['Content-Length'] = \strlen($body);
432432

433433
return [$status, $headers, $body];
434434
}

0 commit comments

Comments
 (0)