GoogleMaps   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 13
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A init() 0 10 2
1
<?php
2
3
namespace Flynt\Features\Acf;
4
5
class GoogleMaps
6
{
7
    public static function init()
8
    {
9
        add_filter('acf/fields/google_map/api', function ($api) {
10
            $apiKey = OptionPages::get('globalOptions', 'feature', 'Acf', 'googleMapsApiKey');
11
            if ($apiKey) {
12
                $api['key'] = $apiKey;
13
            }
14
            return $api;
15
        });
16
    }
17
}
18