Code Duplication    Length = 7-7 lines in 2 locations

src/Xml/XmlContext.php 2 locations

@@ 251-257 (lines=7) @@
248
     *
249
     * @Then /^[Tt]he XML should use the namespace "(?P<namespace>[^"]*)"$/
250
     */
251
    public function theXmlShouldUseTheNamespace($namespace)
252
    {
253
        $namespaces = $this->getNamespaces();
254
        if (!in_array($namespace, $namespaces)) {
255
            throw new \Exception(sprintf("The namespace '%s' is not used", $namespace));
256
        }
257
    }
258
259
    /**
260
     * Checks that the XML does not use the specified namespace
@@ 264-270 (lines=7) @@
261
     *
262
     * @Then /^[Tt]he XML should not use the namespace "(?P<namespace>[^"]*)"$/
263
     */
264
    public function theXmlShouldNotUseTheNamespace($namespace)
265
    {
266
        $namespaces = $this->getNamespaces();
267
        if (in_array($namespace, $namespaces)) {
268
            throw new \Exception(sprintf("The namespace '%s' is used", $namespace));
269
        }
270
    }
271
272
    /**
273
     * Optimistically (ignoring errors) attempt to pretty-print the last XML response