Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
freekmurze committed May 31, 2019
1 parent 10033ee commit 7d6a8b4
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 10 deletions.
2 changes: 0 additions & 2 deletions .travis.yml
@@ -1,8 +1,6 @@
language: php

php:
- 7.0
- 7.1
- 7.2
- 7.3

Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Expand Up @@ -2,6 +2,11 @@

All notable changes to `geocoder` will be documented in this file.

## 3.5.0 - 2019-05-31

- add country parameter
- drop support for PHP 7.1 and smaller

## 3.4.0 - 2018-01-24

- include address components in the response
Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -100,7 +100,7 @@ return [
'bounds' => '',

/*
* The country param used to limit results to a specific Country by its code
* The country param used to limit results to a specific country.
*
* More info: https://developers.google.com/maps/documentation/javascript/geocoding#GeocodingRequests
*/
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Expand Up @@ -18,14 +18,14 @@
}
],
"require": {
"php": ">=7.0",
"php": "^7.2",
"illuminate/support": "^5.0",
"guzzlehttp/guzzle": "~6.0"

},
"require-dev": {
"phpunit/phpunit": "^6.4",
"vlucas/phpdotenv": "^2.4"
"phpunit/phpunit": "^8.0",
"vlucas/phpdotenv": "^3.0"
},
"autoload": {
"psr-4": {
Expand Down
2 changes: 1 addition & 1 deletion config/geocoder.php
Expand Up @@ -30,7 +30,7 @@
'bounds' => '',

/*
* The country param used to limit results to a specific Country by its code
* The country param used to limit results to a specific country.
*
* More info: https://developers.google.com/maps/documentation/javascript/geocoding#GeocodingRequests
*/
Expand Down
5 changes: 4 additions & 1 deletion src/Geocoder.php
Expand Up @@ -145,7 +145,10 @@ protected function getRequestPayload(array $parameters): array
], $parameters);

if ($this->country) {
$parameters = array_merge($parameters, ['components' => 'country:'.$this->country]);
$parameters = array_merge(
$parameters,
['components' => 'country:'.$this->country]
);
}

return ['query' => $parameters];
Expand Down
2 changes: 1 addition & 1 deletion tests/GeocoderTest.php
Expand Up @@ -10,7 +10,7 @@ class GeocoderTest extends TestCase
/** @var \Spatie\Geocoder\Geocoder */
protected $geocoder;

public function setUp()
public function setUp(): void
{
parent::setUp();

Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase.php
Expand Up @@ -7,7 +7,7 @@

class TestCase extends PHPUnitTestCase
{
protected function setUp()
protected function setUp(): void
{
parent::setUp();

Expand Down

0 comments on commit 7d6a8b4

Please sign in to comment.