GeoipFactory   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 15
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getProvider() 0 4 1
A configureOptionResolver() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the BazingaGeocoderBundle package.
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 *
10
 * @license    MIT License
11
 */
12
13
namespace Bazinga\GeocoderBundle\ProviderFactory;
14
15
use Geocoder\Provider\Geoip\Geoip;
16
use Geocoder\Provider\Provider;
17
use Symfony\Component\OptionsResolver\OptionsResolver;
18
19
final class GeoipFactory extends AbstractFactory
20
{
21
    protected static $dependencies = [
22
        ['requiredClass' => Geoip::class, 'packageName' => 'geocoder-php/geoip-provider'],
23
    ];
24
25
    protected function getProvider(array $config): Provider
26
    {
27
        return new Geoip();
28
    }
29
30
    protected static function configureOptionResolver(OptionsResolver $resolver)
31
    {
32
    }
33
}
34