Skip to content

Commit 4313b5a

Browse files
committed
Fix CS
1 parent f85c543 commit 4313b5a

File tree

4 files changed

+8
-14
lines changed

4 files changed

+8
-14
lines changed

Doctrine/ORM/GeocoderListener.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,11 @@ public function __construct(Provider $geocoder, DriverInterface $driver)
2525
{
2626
@trigger_error(sprintf('The class "%s" is deprecated and will be removed from a future version. Please remove it from your service definition.', self::class));
2727

28-
$locator = new ServiceLocator(array(
29-
'bazinga_geocoder.provider.' =>
30-
function () use ($geocoder) {
28+
$locator = new ServiceLocator([
29+
'bazinga_geocoder.provider.' => function () use ($geocoder) {
3130
return $geocoder;
32-
}
33-
));
31+
},
32+
]);
3433

3534
parent::__construct($locator, $driver);
3635
}

Mapping/Driver/AttributeDriver.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,13 @@ public function loadMetadataFromObject($object): ClassMetadata
6363

6464
foreach ($reflection->getProperties() as $property) {
6565
foreach ($property->getAttributes() as $attribute) {
66-
67-
if ($attribute->getName() === Annotations\Latitude::class) {
66+
if (Annotations\Latitude::class === $attribute->getName()) {
6867
$property->setAccessible(true);
6968
$metadata->latitudeProperty = $property;
70-
} elseif ($attribute->getName() === Annotations\Longitude::class) {
69+
} elseif (Annotations\Longitude::class === $attribute->getName()) {
7170
$property->setAccessible(true);
7271
$metadata->longitudeProperty = $property;
73-
} elseif ($attribute->getName() === Annotations\Address::class) {
72+
} elseif (Annotations\Address::class === $attribute->getName()) {
7473
$property->setAccessible(true);
7574
$metadata->addressProperty = $property;
7675
}

Mapping/Driver/ChainDriver.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,7 @@
1212

1313
namespace Bazinga\GeocoderBundle\Mapping\Driver;
1414

15-
use Bazinga\GeocoderBundle\Mapping\Annotations;
16-
use Bazinga\GeocoderBundle\Mapping\ClassMetadata;
17-
use Bazinga\GeocoderBundle\Mapping\Exception;
1815
use Bazinga\GeocoderBundle\Mapping\Exception\MappingException;
19-
use Doctrine\Common\Annotations\Reader;
2016

2117
/**
2218
* @author Pierre du Plessis <[email protected]>

Tests/Mapping/Driver/AttributeDriverTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212

1313
namespace Bazinga\GeocoderBundle\Tests\Mapping\Driver;
1414

15-
use Bazinga\GeocoderBundle\Mapping\Annotations\Geocodeable;
1615
use Bazinga\GeocoderBundle\Mapping\Annotations\Address;
16+
use Bazinga\GeocoderBundle\Mapping\Annotations\Geocodeable;
1717
use Bazinga\GeocoderBundle\Mapping\Annotations\Latitude;
1818
use Bazinga\GeocoderBundle\Mapping\Annotations\Longitude;
1919
use Bazinga\GeocoderBundle\Mapping\Driver\AttributeDriver;

0 commit comments

Comments
 (0)