File tree Expand file tree Collapse file tree 3 files changed +42
-2
lines changed Expand file tree Collapse file tree 3 files changed +42
-2
lines changed Original file line number Diff line number Diff line change
1
+ Contributing
2
+ ============
3
+
4
+ First of all, thank you for contributing, you are awesome! Here are a few rules
5
+ to follow in order to ease code reviews, and discussions before maintainers
6
+ accept and merge your work.
7
+
8
+ You MUST follow the [ PSR-1] ( http://www.php-fig.org/psr/1/ ) and
9
+ [ PSR-2] ( http://www.php-fig.org/psr/2/ ) . If you don't know about any of them, you
10
+ should really read the recommendations. Can't wait? Use the [ PHP-CS-Fixer
11
+ tool] ( http://cs.sensiolabs.org/ ) .
12
+
13
+ You MUST run the test suite.
14
+
15
+ You MUST write (or update) unit tests.
16
+
17
+ You SHOULD write documentation.
18
+
19
+ Please, write [ commit messages that make
20
+ sense] ( http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html ) ,
21
+ and [ rebase your branch] ( http://git-scm.com/book/en/Git-Branching-Rebasing )
22
+ before submitting your Pull Request.
23
+
24
+ One may ask you to [ squash your
25
+ commits] ( http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html )
26
+ too. This is used to "clean" your Pull Request before merging it (we don't want
27
+ commits such as ` fix tests ` , ` fix 2 ` , ` fix 3 ` , etc.).
28
+
29
+ Thank you!
Original file line number Diff line number Diff line change @@ -410,6 +410,7 @@ The Geocoder's API is fluent, you can write:
410
410
$result = $geocoder
411
411
->registerProvider(new \My\Provider\Custom($adapter))
412
412
->using('custom')
413
+ ->limit(10)
413
414
->geocode('68.145.37.34')
414
415
;
415
416
```
@@ -418,6 +419,11 @@ The `using()` method allows you to choose the `provider` to use by its name.
418
419
When you deal with multiple providers, you may want to choose one of them.
419
420
The default behavior is to use the first one but it can be annoying.
420
421
422
+ The ` limit() ` method allows you to configure the maximum number of results
423
+ being returned. Depending on the provider you may not get as many results as
424
+ expected, it is a maximum limit, not the expected number of results.
425
+
426
+
421
427
Reverse Geocoding
422
428
-----------------
423
429
@@ -555,6 +561,12 @@ You can provide your own `dumper` by implementing the `DumperInterface`.
555
561
Write your own ` formatter ` by implementing the ` FormatterInterface ` .
556
562
557
563
564
+ Contributing
565
+ ------------
566
+
567
+ See CONTRIBUTING file.
568
+
569
+
558
570
Unit Tests
559
571
----------
560
572
Original file line number Diff line number Diff line change @@ -54,8 +54,7 @@ class Geocoder implements GeocoderInterface
54
54
* @param ResultFactoryInterface $resultFactory
55
55
* @param integer $maxResults
56
56
*/
57
- public function __construct (ProviderInterface $ provider = null , ResultFactoryInterface $ resultFactory = null ,
58
- $ maxResults = self ::MAX_RESULTS )
57
+ public function __construct (ProviderInterface $ provider = null , ResultFactoryInterface $ resultFactory = null , $ maxResults = self ::MAX_RESULTS )
59
58
{
60
59
$ this ->provider = $ provider ;
61
60
You can’t perform that action at this time.
0 commit comments