Skip to content

Commit 658cecf

Browse files
broiniacNyholm
authored andcommitted
Doc fixes (#209)
* doc: trim whitespaces * doc: fix "Back to documentation index" links * doc: fix code block opening tag
1 parent aa416e4 commit 658cecf

File tree

6 files changed

+56
-56
lines changed

6 files changed

+56
-56
lines changed

Resources/doc/cache.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Caching the geocoder response
22

3-
*[<< Back to documentation index](Resources/doc/index.md)*
3+
*[<< Back to documentation index](/Resources/doc/index.md)*
44

5-
It is quite rare that a location response gets updated. That is why it is a good idea to cache the responses. The second
5+
It is quite rare that a location response gets updated. That is why it is a good idea to cache the responses. The second
66
request will be both quicker and free of charge. To get started with caching you may use the `CachePlugin` which is supported
7-
by default in our configuration.
7+
by default in our configuration.
88

99
```yaml
1010
# config.yml
@@ -18,17 +18,17 @@ bazinga_geocoder:
1818
```
1919
2020
If you do a lot of reverse queries it can be useful to cache them with less precision. So if you are interested in only the city,
21-
you don't want to query for every exact coordinate. Instead, you want to remove some precision of the coordinates. For example:
22-
reversing `52.3705273, 4.891031` will be cached as `52.3705, 4.8910`.
21+
you don't want to query for every exact coordinate. Instead, you want to remove some precision of the coordinates. For example:
22+
reversing `52.3705273, 4.891031` will be cached as `52.3705, 4.8910`.
2323

2424
You may use any [PSR16](http://www.php-fig.org/psr/psr-16/) cache [implementation](https://packagist.org/providers/psr/simple-cache-implementation).
25-
The `CachePlugin` helps you to cache all responses.
25+
The `CachePlugin` helps you to cache all responses.
2626

2727
## Decorator pattern
2828

2929
If you do not like using the `CachePlugin` for some reason you may use the [`CacheProvider`](https://github.com/geocoder-php/cache-provider).
30-
The `CacheProvider` is using the [Decorator pattern](https://en.wikipedia.org/wiki/Decorator_pattern) to do caching. Which
31-
means that you wrap the `CacheProvider` around your existing provider.
30+
The `CacheProvider` is using the [Decorator pattern](https://en.wikipedia.org/wiki/Decorator_pattern) to do caching. Which
31+
means that you wrap the `CacheProvider` around your existing provider.
3232

3333
```bash
3434
composer require geocoder-php/cache-provider
@@ -52,7 +52,7 @@ servies:
5252

5353
## Installing a PSR16 cache
5454

55-
You may use any adapter from [PHP-cache.com](http://www.php-cache.com/en/latest/) or `symfony/cache`.
55+
You may use any adapter from [PHP-cache.com](http://www.php-cache.com/en/latest/) or `symfony/cache`.
5656

5757
## Using Symfony cache
5858

@@ -87,7 +87,7 @@ bazinga_geocoder:
8787
cache_precision: 4
8888
```
8989

90-
For older Symfony version, you can use a bridge between PSR-6 and PSR-16. Install the
90+
For older Symfony version, you can use a bridge between PSR-6 and PSR-16. Install the
9191
[bridge](https://github.com/php-cache/simple-cache-bridge) by:
9292

9393
```bash

Resources/doc/custom-provider.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Registering Your Own Providers
22

3-
*[<< Back to documentation index](Resources/doc/index.md)*
3+
*[<< Back to documentation index](/Resources/doc/index.md)*
44

55
If you want to use your own provider in your application, create a service, and tag it as `bazinga_geocoder.provider`:
66

@@ -12,7 +12,7 @@ If you want to use your own provider in your application, create a service, and
1212
```
1313

1414
The bundle will automatically register your provider into the`Geocoder\ProviderAggregator` service. However, it will not
15-
show up the the web profiler because it is not registered with the [PluginProvider](Resources/doc/plguins.md).
15+
show up the the web profiler because it is not registered with the [PluginProvider](/Resources/doc/plugins.md).
1616

1717
If you want your provider to show up the web profiler you have to create a custom factory for your provider.
1818

@@ -26,17 +26,17 @@ use Acme\Demo\Service\Foo;
2626
final class MyFactory extends AbstractFactory
2727
{
2828
private $fooService;
29-
29+
3030
public function __construct(Foo $service) {
3131
$this->someService = $service;
3232
}
33-
33+
3434
protected function getProvider(array $config)
3535
{
3636
return new MyProvider($this->fooService);
3737
}
3838
}
39-
```
39+
```
4040

4141
```yaml
4242
bazinga_geocoder:

Resources/doc/doctrine.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Doctrine annotation support
22

3-
*[<< Back to documentation index](Resources/doc/index.md)*
3+
*[<< Back to documentation index](/Resources/doc/index.md)*
44

5-
Wouldn't it be great if you could automatically save the coordinates of a users
5+
Wouldn't it be great if you could automatically save the coordinates of a users
66
address every time it is updated? Wait not more here is the feature you been always
77
wanted.
88

9-
``` php
9+
```php
1010

1111
use Bazinga\GeocoderBundle\Mapping\Annotations as Geocoder;
1212

Resources/doc/index.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Installation
3131
------------
3232

3333
To install this bundle you need to know how to [install the geocoder and providers](https://github.com/geocoder-php/Geocoder#installation)
34-
and then you may just install the bundle like normal:
34+
and then you may just install the bundle like normal:
3535

3636
```bash
3737
composer require willdurand/geocoder-bundle:^5.0
@@ -53,9 +53,9 @@ public function registerBundles()
5353
Usage
5454
-----
5555

56-
The bundle helps you register your providers and to enable profiling support. To
56+
The bundle helps you register your providers and to enable profiling support. To
5757
configure a provider you must use a `ProviderFactory`. See the following example
58-
using Google Maps.
58+
using Google Maps.
5959

6060
```yaml
6161
bazinga_geocoder:
@@ -64,10 +64,10 @@ bazinga_geocoder:
6464
factory: Bazinga\GeocoderBundle\ProviderFactory\GoogleMapsFactory
6565
```
6666
67-
This will create a service named `bazinga_geocoder.provider.acme` which is a
67+
This will create a service named `bazinga_geocoder.provider.acme` which is a
6868
`GoogleMapsProvider`.
6969

70-
You can also configure **all ``ProviderFactories``** to adjust the behavior of the
70+
You can also configure **all ``ProviderFactories``** to adjust the behavior of the
7171
provider.
7272

7373
```yaml
@@ -77,22 +77,22 @@ bazinga_geocoder:
7777
factory: Bazinga\GeocoderBundle\ProviderFactory\GoogleMapsFactory
7878
cache: 'any.psr16.service'
7979
cache_lifetime: 3600
80-
aliases:
80+
aliases:
8181
- my_geocoder
8282
```
8383

84-
This will create a service named `my_geocoder` that caches the responses for one
84+
This will create a service named `my_geocoder` that caches the responses for one
8585
hour.
8686

87-
**Most ``ProviderFactories``** do also take an array with options. This is usually
87+
**Most ``ProviderFactories``** do also take an array with options. This is usually
8888
parameters to the constructor of the provider. In the example of Google Maps:
8989

9090
```yaml
9191
bazinga_geocoder:
9292
providers:
9393
acme:
9494
factory: Bazinga\GeocoderBundle\ProviderFactory\GoogleMapsFactory
95-
options:
95+
options:
9696
httplug_client: '@httplug.client' # When using HTTPlugBundle
9797
region: 'Sweden'
9898
api_key: 'xxyy'
@@ -177,7 +177,7 @@ If set, the parameter will replace all instances of "127.0.0.1" in your queries
177177

178178
Sometimes you have to cache the results from a provider. For this case the bundle provides
179179
simple configuration. You only need to provide a service name for you SimpleCache (PSR-16)
180-
service and you are good to go.
180+
service and you are good to go.
181181

182182
```yaml
183183
bazinga_geocoder:
@@ -234,10 +234,10 @@ To register a new dumper, you must tag it with `bazinga_geocoder.dumper`.
234234
### Custom HTTP Client
235235

236236
The HTTP geocoder providers integrates with [HTTPlug](http://httplug.io/). It will give you all
237-
the power of the HTTP client. You have to select which one you want to use and how
238-
you want to configure it.
237+
the power of the HTTP client. You have to select which one you want to use and how
238+
you want to configure it.
239239

240-
Read their [usage page](http://docs.php-http.org/en/latest/httplug/users.html), you
240+
Read their [usage page](http://docs.php-http.org/en/latest/httplug/users.html), you
241241
may also be interested in checking out the [HTTPlugBundle](https://github.com/php-http/HttplugBundle).
242242

243243
An example, if you want to use Guzzle6.
@@ -251,16 +251,16 @@ Reference Configuration
251251

252252
You'll find the reference configuration below:
253253

254-
``` yaml
254+
```yaml
255255
# app/config/config.yml
256256
bazinga_geocoder:
257-
profiling:
257+
profiling:
258258
enabled: ~ # Default is same as kernel.debug
259259
fake_ip:
260260
enabled: true
261261
ip: null
262262
providers:
263-
# ...
263+
# ...
264264
acme:
265265
factory: ~ # Required
266266
cache: 'app.cache'
@@ -269,9 +269,9 @@ bazinga_geocoder:
269269
limit: 5
270270
locale: 'sv'
271271
logger: 'logger'
272-
plugins:
272+
plugins:
273273
- my_custom_plugin
274-
aliases:
274+
aliases:
275275
- acme
276276
- acme_geocoder
277277
options:
@@ -290,15 +290,15 @@ Backwards compatibility
290290
-----------------------
291291

292292
The BazingaGeocoderBundle is just a Symfony integration for Geocoder-PHP and it
293-
does not have any classes which falls under the BC promise. The backwards compatibility
293+
does not have any classes which falls under the BC promise. The backwards compatibility
294294
of the bundle is only the configuration and its values (and of course the behavior
295295
of those values).
296296

297297
The public service names (excluding the ones related to profiling/DataCollector)
298-
falls under the backwards compatibility promise.
298+
falls under the backwards compatibility promise.
299299

300-
Bottom line is, that you can trust that your configuration will not break and that
301-
the services you use will still be working.
300+
Bottom line is, that you can trust that your configuration will not break and that
301+
the services you use will still be working.
302302

303303
Testing
304304
-------
@@ -320,7 +320,7 @@ Traivs but if you want to run it locally you must do the following.
320320
composer require phpunit/phpunit:^5.7 --no-update
321321
composer update --prefer-source
322322
wget https://phar.phpunit.de/phpunit-5.7.phar
323-
php phpunit-5.7.phar --testsuit doctrine
323+
php phpunit-5.7.phar --testsuit doctrine
324324
```
325325

326326
**Important:** this command must be run with `--prefer-source`, otherwise the

Resources/doc/plugins.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Plugins
22

3-
*[<< Back to documentation index](Resources/doc/index.md)*
3+
*[<< Back to documentation index](/Resources/doc/index.md)*
44

5-
Plugins lets you modify or take actions the `Query` or the result. There are a few plugins from the `geocoder-php/plugin`
6-
package like `LimitPlugin`, `LoggerPlugin` and `CachePlugin`. Some of them are supported in the configuration.
5+
Plugins lets you modify or take actions the `Query` or the result. There are a few plugins from the `geocoder-php/plugin`
6+
package like `LimitPlugin`, `LoggerPlugin` and `CachePlugin`. Some of them are supported in the configuration.
77

88
```yaml
99
# config.yml
@@ -17,17 +17,17 @@ bazinga_geocoder:
1717
limit: 5 # Uses the LimitPlugin
1818
locale: 'sv' # Uses the LocalePlugin
1919
logger: 'logger' # Uses the LoggerPlugin
20-
```
20+
```
2121
2222
To use a any other plugins you must first register them as a service. Say you want to add some data to each query. You
23-
may then use the `QueryDataPlugin`.
23+
may then use the `QueryDataPlugin`.
2424

2525
```yaml
2626
# services.yml
27-
sevices:
27+
sevices:
2828
app.query_data_plugin:
2929
class: Geocoder\Plugin\Plugin\QueryDataPlugin
30-
arguments:
30+
arguments:
3131
- ['foo': 'bar']
3232
- true
3333
```
@@ -38,10 +38,10 @@ bazinga_geocoder:
3838
providers:
3939
acme:
4040
factory: Bazinga\GeocoderBundle\ProviderFactory\GoogleMapsFactory
41-
plugins:
41+
plugins:
4242
- "app.query_data_plugin"
43-
```
43+
```
4444

4545
This will execute `$query = $query->withData('foo', 'bar');` on all queries executed by the acme provider.
4646

47-
Read more about plugins at the [Geocoder's documentation](https://github.com/geocoder-php/Geocoder).
47+
Read more about plugins at the [Geocoder's documentation](https://github.com/geocoder-php/Geocoder).

Resources/doc/services.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Public services
22

3-
*[<< Back to documentation index](Resources/doc/index.md)*
3+
*[<< Back to documentation index](/Resources/doc/index.md)*
44

5-
This is a list of our public services. They are all part of [BC promise](Resources/doc/index.md#backwards-compatibility).
5+
This is a list of our public services. They are all part of [BC promise](/Resources/doc/index.md#backwards-compatibility).
66

77
### Provider Factories
88

9-
Here is a list of all provider factories and their options.
9+
Here is a list of all provider factories and their options.
1010

1111
| Service | Options |
1212
| ------- | ------- |
@@ -15,7 +15,7 @@ Here is a list of all provider factories and their options.
1515
| `Bazinga\GeocoderBundle\ProviderFactory\ChainFactory` | services
1616
| `Bazinga\GeocoderBundle\ProviderFactory\FreeGeoIpFactory` | httplug_client, base_url
1717
| `Bazinga\GeocoderBundle\ProviderFactory\GeoIP2Factory` | provider, database_filename, user_id, license_key, webservice_options, locales, provider_service
18-
| `Bazinga\GeocoderBundle\ProviderFactory\GeoipFactory` |
18+
| `Bazinga\GeocoderBundle\ProviderFactory\GeoipFactory` |
1919
| `Bazinga\GeocoderBundle\ProviderFactory\GeoIPsFactory` | httplug_client, api_key
2020
| `Bazinga\GeocoderBundle\ProviderFactory\GeonamesFactory` | httplug_client, username
2121
| `Bazinga\GeocoderBundle\ProviderFactory\GeoPluginFactory` | httplug_client
@@ -36,7 +36,7 @@ Here is a list of all provider factories and their options.
3636

3737
### Services
3838

39-
Except for the provider factories, here is a list of services this bundle exposes are:
39+
Except for the provider factories, here is a list of services this bundle exposes are:
4040

4141
* `Geocoder\ProviderAggregator`
4242
* `Geocoder\Dumper\GeoArray`

0 commit comments

Comments
 (0)