Code Duplication    Length = 10-10 lines in 2 locations

src/MediaInfo.php 2 locations

@@ 94-103 (lines=10) @@
91
     *
92
     * @throws \Exception
93
     */
94
    public function setConfig($key, $value)
95
    {
96
        if (!array_key_exists($key, $this->configuration)) {
97
            throw new \Exception(
98
                sprintf('key "%s" does\'t exist', $key)
99
            );
100
        }
101
102
        $this->configuration[$key] = $value;
103
    }
104
105
    /**
106
     * @param $key
@@ 112-121 (lines=10) @@
109
     *
110
     * @return mixed
111
     */
112
    public function getConfig($key)
113
    {
114
        if (!array_key_exists($key, $this->configuration)) {
115
            throw new \Exception(
116
                sprintf('key "%s" does\'t exist', $key)
117
            );
118
        }
119
120
        return $this->configuration[$key];
121
    }
122
}
123