GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Code Duplication    Length = 14-14 lines in 2 locations

src/Baruica/Xml/XmlReader/DomDocXmlReader.php 2 locations

@@ 16-29 (lines=14) @@
13
        $this->domXpath = new \DOMXPath($domDocument);
14
    }
15
16
    public static function fromFile(string $filePath): self
17
    {
18
        $domDocument = new \DOMDocument();
19
20
        try {
21
            if (false === file_exists($filePath) || false === $domDocument->load($filePath)) {
22
                throw new \RuntimeException(sprintf('Could not load xml file [%s].', $filePath));
23
            }
24
        } catch (\Exception $e) {
25
            throw new \RuntimeException($e->getMessage());
26
        }
27
28
        return new self($domDocument);
29
    }
30
31
    public static function fromString(string $xmlStr): self
32
    {
@@ 31-44 (lines=14) @@
28
        return new self($domDocument);
29
    }
30
31
    public static function fromString(string $xmlStr): self
32
    {
33
        $domDocument = new \DOMDocument();
34
35
        try {
36
            if (false === $domDocument->loadXML($xmlStr)) {
37
                throw new \RuntimeException(sprintf('Could not load XML from string [%s]', $xmlStr));
38
            }
39
        } catch (\Exception $e) {
40
            throw new \RuntimeException($e->getMessage());
41
        }
42
43
        return new self($domDocument);
44
    }
45
46
    public function getList(string $xpath): \Generator
47
    {