Code Duplication    Length = 10-14 lines in 2 locations

src/ElasticaExtraBundle/Repository/IndexConfigurationRepository.php 2 locations

@@ 48-61 (lines=14) @@
45
     *
46
     * @return array|null
47
     */
48
    public function getSettings($index)
49
    {
50
        $config = $this->get($index);
51
52
        if (null === $config) {
53
            return null;
54
        }
55
56
        if (!isset($config['settings'])) {
57
            return [];
58
        }
59
60
        return $config['settings'];
61
    }
62
63
    /**
64
     * Get mappings for an index
@@ 70-79 (lines=10) @@
67
     *
68
     * @return array|null
69
     */
70
    public function getMappings($index)
71
    {
72
        $config = $this->get($index);
73
74
        if (null === $config || !isset($config['mappings'])) {
75
            return null;
76
        }
77
78
        return $config['mappings'];
79
    }
80
81
    /**
82
     * Get mapping for a type