Code Duplication    Length = 8-8 lines in 2 locations

src/Extensions/SmokeStop/StopExtension.php 1 location

@@ 42-49 (lines=8) @@
39
        return false;
40
    }
41
42
    public function getStrategy($name)
43
    {
44
        if (array_key_exists($name, $this->stopStrategies)) {
45
            return $this->stopStrategies[$name];
46
        } else {
47
            throw new \RuntimeException("Strategy ('" . $name . "') not found. Available strategies are " . implode(', ', array_keys($this->stopStrategies)));
48
        }
49
    }
50
}
51

src/Config/Configuration.php 1 location

@@ 176-183 (lines=8) @@
173
        }
174
    }
175
176
    public function getExtension($name)
177
    {
178
        if (array_key_exists($name, $this->extensions)) {
179
            return $this->extensions[$name];
180
        } else {
181
            throw new \RuntimeException('The extension ("' . $name . '") you are trying to access does not exist. Registered extensions are: ' . implode(' ,', array_keys($this->extensions)) . '.');
182
        }
183
    }
184
185
    public function addExtension($name, $extension)
186
    {