Skip to content

Commit 84dc5b4

Browse files
committed
bring package up to current package standards
1 parent 13976e2 commit 84dc5b4

File tree

6 files changed

+111
-15
lines changed

6 files changed

+111
-15
lines changed

.editorconfig

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
; This file is for unifying the coding style for different editors and IDEs.
2+
; More information at http://editorconfig.org
3+
4+
root = true
5+
6+
[*]
7+
charset = utf-8
8+
indent_size = 4
9+
indent_style = space
10+
end_of_line = lf
11+
insert_final_newline = true
12+
trim_trailing_whitespace = true
13+
14+
[*.md]
15+
trim_trailing_whitespace = false

.gitattributes

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Path-based git attributes
2+
# https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html
3+
4+
# Ignore all test and documentation with "export-ignore".
5+
/.gitattributes export-ignore
6+
/.gitignore export-ignore
7+
/.travis.yml export-ignore
8+
/phpunit.xml.dist export-ignore
9+
/.scrutinizer.yml export-ignore
10+
/tests export-ignore

.scrutinizer.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
filter:
2+
excluded_paths: [tests/*]
3+
4+
checks:
5+
php:
6+
remove_extra_empty_lines: true
7+
remove_php_closing_tag: true
8+
remove_trailing_whitespace: true
9+
fix_use_statements:
10+
remove_unused: true
11+
preserve_multiple: false
12+
preserve_blanklines: true
13+
order_alphabetically: true
14+
fix_php_opening_tag: true
15+
fix_linefeed: true
16+
fix_line_ending: true
17+
fix_identation_4spaces: true
18+
fix_doc_comments: true
19+
20+
tools:
21+
external_code_coverage: true

.travis.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ language: php
33
php:
44
- 5.5
55
- 5.6
6-
- hhvm
6+
- 7.0
7+
- 7.1
78

89
before_script:
910
- composer install --prefer-source --no-interaction --dev

CONTRIBUTING.md

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Contributing
2+
3+
Contributions are **welcome** and will be fully **credited**.
4+
5+
Please read and understand the contribution guide before creating an issue or pull request.
6+
7+
## Etiquette
8+
9+
This project is open source, and as such, the maintainers give their free time to build and maintain the source code
10+
held within. They make the code freely available in the hope that it will be of use to other developers. It would be
11+
extremely unfair for them to suffer abuse or anger for their hard work.
12+
13+
Please be considerate towards maintainers when raising issues or presenting pull requests. Let's show the
14+
world that developers are civilized and selfless people.
15+
16+
It's the duty of the maintainer to ensure that all submissions to the project are of sufficient
17+
quality to benefit the project. Many developers have different skillsets, strengths, and weaknesses. Respect the maintainer's decision, and do not be upset or abusive if your submission is not used.
18+
19+
## Viability
20+
21+
When requesting or submitting new features, first consider whether it might be useful to others. Open
22+
source projects are used by many developers, who may have entirely different needs to your own. Think about
23+
whether or not your feature is likely to be used by other users of the project.
24+
25+
## Procedure
26+
27+
Before filing an issue:
28+
29+
- Attempt to replicate the problem, to ensure that it wasn't a coincidental incident.
30+
- Check to make sure your feature suggestion isn't already present within the project.
31+
- Check the pull requests tab to ensure that the bug doesn't have a fix in progress.
32+
- Check the pull requests tab to ensure that the feature isn't already in progress.
33+
34+
Before submitting a pull request:
35+
36+
- Check the codebase to ensure that your feature doesn't already exist.
37+
- Check the pull requests to ensure that another person hasn't already submitted the feature or fix.
38+
39+
## Requirements
40+
41+
If the project maintainer has any additional requirements, you will find them listed here.
42+
43+
- **[PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)** - The easiest way to apply the conventions is to install [PHP Code Sniffer](http://pear.php.net/package/PHP_CodeSniffer).
44+
45+
- **Add tests!** - Your patch won't be accepted if it doesn't have tests.
46+
47+
- **Document any change in behaviour** - Make sure the `README.md` and any other relevant documentation are kept up-to-date.
48+
49+
- **Consider our release cycle** - We try to follow [SemVer v2.0.0](http://semver.org/). Randomly breaking public APIs is not an option.
50+
51+
- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests.
52+
53+
- **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please [squash them](http://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages) before submitting.
54+
55+
**Happy coding**!

README.md

+8-14
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
[![StyleCI](https://styleci.io/repos/19355432/shield)](https://styleci.io/repos/19355432)
88
[![Total Downloads](https://img.shields.io/packagist/dt/spatie/geocoder.svg?style=flat-square)](https://packagist.org/packages/spatie/geocoder)
99

10-
Laravel package to convert any address to GPS coordinates.
10+
This Laravel package can convert any address to GPS coordinates.
1111

1212
Spatie is a webdesign agency in Antwerp, Belgium. You'll find an overview of all our open source projects [on our website](https://spatie.be/opensource).
1313

@@ -27,14 +27,10 @@ You can install this package through composer.
2727
composer require spatie/geocoder
2828
```
2929

30-
*Note: use ^1.0 for Laravel 4 support*
31-
32-
When using Laravel there is a service provider that you can make use of.
30+
You must install this service provider
3331

3432
```php
35-
3633
// config/app.php
37-
3834
'providers' => [
3935
'...',
4036
'Spatie\Geocoder\GeocoderServiceProvider'
@@ -45,9 +41,7 @@ Geocoder also comes with a facade, which provides an easy way to call the Geocod
4541

4642

4743
```php
48-
4944
// config/app.php
50-
5145
'aliases' => array(
5246
...
5347
'Geocoder' => 'Spatie\Geocoder\GeocoderFacade',
@@ -62,22 +56,22 @@ Geocoder::getCoordinatesForQuery('Infinite Loop 1, Cupertino');
6256

6357
/*
6458
This function returns an array with keys
65-
"formatted_address" => "2 Infinite Loop, Cupertino, CA 95014, Stati Uniti"
6659
"lat" => 37.331741000000001
6760
"lng" => -122.0303329
6861
"accuracy" => "ROOFTOP"
62+
"formatted_address" => "2 Infinite Loop, Cupertino, CA 95014, Stati Uniti"
6963
*/
7064
```
7165

7266
The accuracy key can contain these values:
73-
- 'ROOFTOP'
74-
- 'RANGE_INTERPOLATED'
75-
- 'GEOMETRIC_CENTER'
76-
- 'APPROXIMATE'
67+
- `ROOFTOP`
68+
- `RANGE_INTERPOLATED`
69+
- `GEOMETRIC_CENTER`
70+
- `APPROXIMATE`
7771

7872
You can read more information about these values [on the Google Geocoding API Page](https://developers.google.com/maps/documentation/geocoding/ "Google Geocoding API")
7973

80-
When an address is not found accuracy will contain 'NOT_FOUND'
74+
When an address is not found accuracy will contain `NOT_FOUND`
8175

8276
## About Spatie
8377
Spatie is a webdesign agency in Antwerp, Belgium. You'll find an overview of all our open source projects [on our website](https://spatie.be/opensource).

0 commit comments

Comments
 (0)