Skip to content

Commit d11d4e5

Browse files
authoredJul 15, 2017
Added metafile and updated badges (#136)
* Added metafile and updated badges * Applied changes from StyleCI * Make sure to send coverage data to Scrutinizer
1 parent 1aeb0ab commit d11d4e5

12 files changed

+78
-26
lines changed
 

‎.editorconfig

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
indent_size = 4
7+
indent_style = space
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true

‎.gitattributes

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
.editorconfig export-ignore
2+
.gitattributes export-ignore
3+
/.github/ export-ignore
4+
.gitignore export-ignore
5+
/.php_cs export-ignore
6+
/.scrutinizer.yml export-ignore
7+
/.styleci.yml export-ignore
8+
/.travis.yml export-ignore
9+
/behat.yml.dist export-ignore
10+
/features/ export-ignore
11+
/phpspec.ci.yml export-ignore
12+
/phpspec.yml.dist export-ignore
13+
/phpunit.xml.dist export-ignore
14+
/spec/ export-ignore
15+
/Tests/ export-ignore

‎.gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
composer.phar
1+
build/
22
composer.lock
3+
composer.phar
4+
phpunit.xml
35
vendor/

‎.php_cs

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
3+
/*
4+
* In order to make it work, fabpot/php-cs-fixer and sllh/php-cs-fixer-styleci-bridge must be installed globally
5+
* with composer.
6+
*
7+
* @link https://github.com/Soullivaneuh/php-cs-fixer-styleci-bridge
8+
* @link https://github.com/FriendsOfPHP/PHP-CS-Fixer
9+
*/
10+
11+
use SLLH\StyleCIBridge\ConfigBridge;
12+
13+
return ConfigBridge::create();

‎.styleci.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
preset: symfony
2+
3+
finder:
4+
exclude:
5+
- "Resources"
6+
- "vendor"
7+
8+
enabled:
9+
- short_array_syntax
10+
11+
disabled:
12+
- phpdoc_annotation_without_dot # This is still buggy: https://github.com/symfony/symfony/pull/19198

‎.travis.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ matrix:
2121
env: SYMFONY_VERSION=4.0.*
2222
include:
2323
- php: 7.0
24-
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" SYMFONY_VERSION=3.3.* TEST_COMMAND="phpunit --coverage-text --coverage-clover=build/coverage.xml"
24+
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" SYMFONY_VERSION=3.3.* TEST_COMMAND="phpunit --coverage-text --coverage-clover=build/coverage.xml" COVERAGE=true
2525
- php: 7.1
2626
env: SYMFONY_VERSION=4.0.*
2727

@@ -32,3 +32,7 @@ before_script:
3232

3333
script:
3434
- phpunit
35+
36+
after_success:
37+
- if [[ $COVERAGE = true ]]; then wget https://scrutinizer-ci.com/ocular.phar; fi
38+
- if [[ $COVERAGE = true ]]; then php ocular.phar code-coverage:upload --format=php-clover build/coverage.xml; fi

‎DataCollector/GeocoderDataCollector.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public function getProviders(): array
8282
*
8383
* @return array
8484
*/
85-
public function getProviderQueries($provider):array
85+
public function getProviderQueries($provider): array
8686
{
8787
return array_filter($this->data['queries'], function ($data) use ($provider) {
8888
return $data['providerName'] === $provider;

‎DataCollector/ProfilingProvider.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,11 @@ private function logQuery($query, float $duration, Collection $result = null)
8383
}
8484

8585
$this->queries[] = [
86-
'query' => $query,
87-
'queryString' => $queryString,
88-
'duration' => $duration,
86+
'query' => $query,
87+
'queryString' => $queryString,
88+
'duration' => $duration,
8989
'providerName' => $this->getName(),
90-
'result' => $result,
90+
'result' => $result,
9191
];
9292
}
9393

‎ProviderFactory/GoogleMapsFactory.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ protected static function configureOptionResolver(OptionsResolver $resolver)
3232
{
3333
$resolver->setDefaults([
3434
'httplug_client' => null,
35-
'region' => null,
36-
'api_key' => null,
35+
'region' => null,
36+
'api_key' => null,
3737
]);
3838

3939
$resolver->setAllowedTypes('httplug_client', [HttpClient::class, 'null']);

‎README.md

+9-12
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,16 @@
11
BazingaGeocoderBundle
22
=====================
33

4-
[![Build
5-
Status](https://secure.travis-ci.org/geocoder-php/BazingaGeocoderBundle.png)](http://travis-ci.org/geocoder-php/BazingaGeocoderBundle)
6-
[![Total
7-
Downloads](https://poser.pugx.org/willdurand/geocoder-bundle/downloads.png)](https://packagist.org/packages/willdurand/geocoder-bundle)
8-
[![Latest Stable
9-
Version](https://poser.pugx.org/willdurand/geocoder-bundle/v/stable.png)](https://packagist.org/packages/willdurand/geocoder-bundle)
4+
[![Build Status](https://travis-ci.org/geocoder-php/BazingaGeocoderBundle.svg?branch=master)](http://travis-ci.org/geocoder-php/BazingaGeocoderBundle)
5+
[![Latest Stable Version](https://poser.pugx.org/willdurand/geocoder-bundle/v/stable)](https://packagist.org/packages/willdurand/geocoder-bundle)
6+
[![Total Downloads](https://poser.pugx.org/willdurand/geocoder-bundle/downloads)](https://packagist.org/packages/willdurand/geocoder-bundle)
7+
[![Monthly Downloads](https://poser.pugx.org/willdurand/geocoder-bundle/d/monthly.png)](https://packagist.org/packages/willdurand/geocoder-bundle)
8+
[![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/geocoder-php/BazingaGeocoderBundle.svg?style=flat-square)](https://scrutinizer-ci.com/g/geocoder-php/BazingaGeocoderBundle)
9+
[![Quality Score](https://img.shields.io/scrutinizer/g/geocoder-php/BazingaGeocoderBundle.svg?style=flat-square)](https://scrutinizer-ci.com/g/geocoder-php/BazingaGeocoderBundle)
10+
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE)
1011

1112
Integration of the [**Geocoder**](http://github.com/geocoder-php/Geocoder) library
12-
into Symfony2.
13-
14-
**Important:** this bundle is developed in sync with [Geocoder's
15-
repository](http://github.com/geocoder-php/Geocoder). If you are using Geocoder
16-
`1.x`, you need to use the `~1.5` releases of the bundle (or lower).
17-
13+
into Symfony.
1814

1915
Documentation
2016
-------------
@@ -39,6 +35,7 @@ Credits
3935
-------
4036

4137
* William Durand
38+
* Tobias Nyholm
4239
* [All contributors](https://github.com/geocoder-php/BazingaGeocoderBundle/contributors)
4340

4441

‎Tests/Command/GeocodeCommandTest.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ public function testExecute()
3232
$country = new Country('France', 'FR');
3333
$address = Address::createFromArray([
3434
'coordinates' => $coordinates,
35-
'streetNumber'=> '10',
36-
'streetName' => 'rue Gambetta',
37-
'zipCode' => '75020',
38-
'locality' => 'Paris',
35+
'streetNumber' => '10',
36+
'streetName' => 'rue Gambetta',
37+
'zipCode' => '75020',
38+
'locality' => 'Paris',
3939
'countryName' => $country->getName(),
4040
'countryCode' => $country->getCode(),
4141
]);

‎Tests/Mapping/Driver/AnnotationDriverTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public function testLoadMetadata()
5252
}
5353

5454
/**
55-
* @expectedException Bazinga\Bundle\GeocoderBundle\Mapping\Exception\MappingException
55+
* @expectedException \Bazinga\Bundle\GeocoderBundle\Mapping\Exception\MappingException
5656
*/
5757
public function testLoadMetadataFromWrongObject()
5858
{

0 commit comments

Comments
 (0)
Please sign in to comment.