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

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