| Conditions | 1 |
| Paths | 1 |
| Total Lines | 22 |
| Code Lines | 19 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 20 |
| CRAP Score | 1 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 29 | 1 | public function getConfigTreeBuilder() |
|
| 30 | { |
||
| 31 | 1 | return (new TreeBuilder()) |
|
| 32 | 1 | ->root('gpslab_geoip') |
|
| 33 | 1 | ->children() |
|
| 34 | 1 | ->scalarNode('cache') |
|
| 35 | 1 | ->cannotBeEmpty() |
|
| 36 | 1 | ->defaultValue('%kernel.cache_dir%/GeoLite2-City.mmdb') |
|
| 37 | 1 | ->end() |
|
| 38 | 1 | ->scalarNode('url') |
|
| 39 | 1 | ->cannotBeEmpty() |
|
| 40 | 1 | ->defaultValue('http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.mmdb.gz') |
|
| 41 | 1 | ->end() |
|
| 42 | 1 | ->arrayNode('locales') |
|
| 43 | 1 | ->treatNullLike([]) |
|
| 44 | 1 | ->prototype('scalar')->end() |
|
| 45 | 1 | ->defaultValue(['%locale%']) |
|
| 46 | 1 | ->end() |
|
| 47 | 1 | ->end() |
|
| 48 | 1 | ->end() |
|
| 49 | 1 | ; |
|
| 50 | } |
||
| 51 | } |
||
| 52 |