Skip to content

Commit 82d0ff6

Browse files
authored
Apply fixes from StyleCI (#1060)
1 parent 8f973da commit 82d0ff6

File tree

3 files changed

+37
-16
lines changed

3 files changed

+37
-16
lines changed

src/Common/Exception/FunctionNotFound.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ final class FunctionNotFound extends \RuntimeException implements Exception
2323
*/
2424
public function __construct(string $functionName, $description = null)
2525
{
26-
parent::__construct(sprintf('The function "%s" cannot be found. %s',
26+
parent::__construct(sprintf(
27+
'The function "%s" cannot be found. %s',
2728
$functionName,
2829
null !== $description ? sprintf(' %s', $description) : ''
2930
));

src/Provider/AlgoliaPlaces/AlgoliaPlaces.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class AlgoliaPlaces extends AbstractHttpProvider implements Provider
4141

4242
const TYPE_AIRPORT = 'airport';
4343

44-
/** @var string */
44+
/** @var string */
4545
const ENDPOINT_URL_SSL = 'https://places-dsn.algolia.net/1/places/query';
4646

4747
/** @var string */

src/Provider/MaxMind/Tests/MaxMindTest.php

Lines changed: 34 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@ public function testGeocodeWithRealIPv4GetsFakeContentFormattedEmpty()
118118
public function testGeocodeWithRealIPv4GetsFakeContent()
119119
{
120120
$provider = new MaxMind($this->getMockedHttpClient(
121-
'US,TX,Plano,75093,33.034698486328,-96.813400268555,,,,'), 'api_key');
121+
'US,TX,Plano,75093,33.034698486328,-96.813400268555,,,,'
122+
), 'api_key');
122123
$results = $provider->geocodeQuery(GeocodeQuery::create('74.200.247.59'));
123124

124125
$this->assertInstanceOf('Geocoder\Model\AddressCollection', $results);
@@ -149,7 +150,8 @@ public function testGeocodeWithRealIPv4GetsFakeContent()
149150
$this->assertEquals('United Kingdom', $result3->first()->getCountry()->getName());
150151

151152
$provider4 = new MaxMind($this->getMockedHttpClient(
152-
'US,CA,San Francisco,94110,37.748402,-122.415604,807,415,"Layered Technologies","Automattic"'), 'api_key');
153+
'US,CA,San Francisco,94110,37.748402,-122.415604,807,415,"Layered Technologies","Automattic"'
154+
), 'api_key');
153155
$results = $provider4->geocodeQuery(GeocodeQuery::create('74.200.247.59'));
154156

155157
$this->assertInstanceOf('Geocoder\Model\AddressCollection', $results);
@@ -188,8 +190,11 @@ public function testGeocodeWithRealIPv4AndInvalidApiKeyGetsFakeContent()
188190
*/
189191
public function testGeocodeOmniServiceWithRealIPv6AndInvalidApiKeyGetsFakeContent()
190192
{
191-
$provider = new MaxMind($this->getMockedHttpClient(',,,,,,,,,,,,,,,,,,,,,,,,INVALID_LICENSE_KEY'),
192-
'api_key', MaxMind::OMNI_SERVICE);
193+
$provider = new MaxMind(
194+
$this->getMockedHttpClient(',,,,,,,,,,,,,,,,,,,,,,,,INVALID_LICENSE_KEY'),
195+
'api_key',
196+
MaxMind::OMNI_SERVICE
197+
);
193198
$provider->geocodeQuery(GeocodeQuery::create('::ffff:74.200.247.59'));
194199
}
195200

@@ -219,8 +224,11 @@ public function testGeocodeWithRealIPv4AndInvalidApiKeyGetsFakeContent2()
219224
*/
220225
public function testGeocodeOmniServiceWithRealIPv6AndInvalidApiKeyGetsFakeContent2()
221226
{
222-
$provider = new MaxMind($this->getMockedHttpClient(',,,,,,,,,,,,,,,,,,,,,,,INVALID_LICENSE_KEY'),
223-
'api_key', MaxMind::OMNI_SERVICE);
227+
$provider = new MaxMind(
228+
$this->getMockedHttpClient(',,,,,,,,,,,,,,,,,,,,,,,INVALID_LICENSE_KEY'),
229+
'api_key',
230+
MaxMind::OMNI_SERVICE
231+
);
224232
$provider->geocodeQuery(GeocodeQuery::create('::ffff:74.200.247.59'));
225233
}
226234

@@ -235,8 +243,11 @@ public function testGeocodeWithRealIPv4GetsFakeContentWithIpNotFound()
235243

236244
public function testGeocodeOmniServiceWithRealIPv6GetsFakeContentWithIpNotFound()
237245
{
238-
$provider = new MaxMind($this->getMockedHttpClient(',,,,,,,,,,,,,,,,,,,,,,,IP_NOT_FOUND'),
239-
'api_key', MaxMind::OMNI_SERVICE);
246+
$provider = new MaxMind(
247+
$this->getMockedHttpClient(',,,,,,,,,,,,,,,,,,,,,,,IP_NOT_FOUND'),
248+
'api_key',
249+
MaxMind::OMNI_SERVICE
250+
);
240251
$result = $provider->geocodeQuery(GeocodeQuery::create('::fff:74.200.247.59'));
241252

242253
$this->assertInstanceOf(Collection::class, $result);
@@ -289,8 +300,11 @@ public function testGeocodeOmniServiceWithRealIPv4()
289300
$this->markTestSkipped('You need to configure the MAXMIND_API_KEY value in phpunit.xml');
290301
}
291302

292-
$provider = new MaxMind($this->getHttpClient($_SERVER['MAXMIND_API_KEY']), $_SERVER['MAXMIND_API_KEY'],
293-
MaxMind::OMNI_SERVICE);
303+
$provider = new MaxMind(
304+
$this->getHttpClient($_SERVER['MAXMIND_API_KEY']),
305+
$_SERVER['MAXMIND_API_KEY'],
306+
MaxMind::OMNI_SERVICE
307+
);
294308
$results = $provider->geocodeQuery(GeocodeQuery::create('74.200.247.159'));
295309

296310
$this->assertInstanceOf('Geocoder\Model\AddressCollection', $results);
@@ -321,8 +335,11 @@ public function testGeocodeOmniServiceWithRealIPv4WithSslAndEncoding()
321335
$this->markTestSkipped('You need to configure the MAXMIND_API_KEY value in phpunit.xml');
322336
}
323337

324-
$provider = new MaxMind($this->getHttpClient($_SERVER['MAXMIND_API_KEY']), $_SERVER['MAXMIND_API_KEY'],
325-
MaxMind::OMNI_SERVICE);
338+
$provider = new MaxMind(
339+
$this->getHttpClient($_SERVER['MAXMIND_API_KEY']),
340+
$_SERVER['MAXMIND_API_KEY'],
341+
MaxMind::OMNI_SERVICE
342+
);
326343
$results = $provider->geocodeQuery(GeocodeQuery::create('189.26.128.80'));
327344

328345
$this->assertInstanceOf('Geocoder\Model\AddressCollection', $results);
@@ -353,8 +370,11 @@ public function testGeocodeOmniServiceWithRealIPv6WithSsl()
353370
$this->markTestSkipped('You need to configure the MAXMIND_API_KEY value in phpunit.xml');
354371
}
355372

356-
$provider = new MaxMind($this->getHttpClient($_SERVER['MAXMIND_API_KEY']), $_SERVER['MAXMIND_API_KEY'],
357-
MaxMind::OMNI_SERVICE);
373+
$provider = new MaxMind(
374+
$this->getHttpClient($_SERVER['MAXMIND_API_KEY']),
375+
$_SERVER['MAXMIND_API_KEY'],
376+
MaxMind::OMNI_SERVICE
377+
);
358378
$results = $provider->geocodeQuery(GeocodeQuery::create('2002:4293:f4d6:0:0:0:0:0'));
359379

360380
$this->assertInstanceOf('Geocoder\Model\AddressCollection', $results);

0 commit comments

Comments
 (0)