Code Duplication    Length = 15-16 lines in 2 locations

src/Container/FlatContainer.php 2 locations

@@ 50-64 (lines=15) @@
47
     *
48
     * @return bool
49
     */
50
    public function has($key)
51
    {
52
        if (mb_strpos($key, static::DELIMITER) !== false) {
53
            $top = $this->getAll();
54
55
            foreach (explode(static::DELIMITER, $key) as $node) {
56
                if (!isset($top[$node])) {
57
                    return false;
58
                }
59
                $top = $top[$node];
60
            }
61
            return true;
62
        }
63
        return parent::has($key);
64
    }
65
66
    /**
67
     * @param string $key
@@ 71-86 (lines=16) @@
68
     *
69
     * @return mixed|null
70
     */
71
    public function get($key)
72
    {
73
        if (mb_strpos($key, static::DELIMITER) !== false) {
74
            $top = $this->getAll();
75
76
            foreach (explode(static::DELIMITER, $key) as $node) {
77
                if (!isset($top[$node])) {
78
                    return null;
79
                }
80
                $top = $top[$node];
81
            }
82
            return $top;
83
        }
84
85
        return parent::get($key);
86
    }
87
88
    /**
89
     * @param string $key