Code Duplication    Length = 9-9 lines in 2 locations

src/HumbugLoader.php 1 location

@@ 32-40 (lines=9) @@
29
     * HumbugLoader constructor.
30
     * @param string $filePath the file path to json output of humbug
31
     */
32
    public function __construct($filePath)
33
    {
34
        $this->json = json_decode(file_get_contents($filePath));
35
        if (json_last_error() !== JSON_ERROR_NONE) {
36
            throw new InvalidArgumentException(
37
                "Can't Parse Humbug json - " . json_last_error_msg()
38
            );
39
        }
40
    }
41
42
    /**
43
     * {@inheritdoc}

src/PhpCsLoader.php 1 location

@@ 69-77 (lines=9) @@
66
     * PhpCsLoader constructor.
67
     * @param string $filePath the file path to the json output from phpcs
68
     */
69
    public function __construct($filePath)
70
    {
71
        $this->json = json_decode(file_get_contents($filePath));
72
        if (json_last_error() !== JSON_ERROR_NONE) {
73
            throw new InvalidArgumentException(
74
                "Can't Parse phpcs json - " . json_last_error_msg()
75
            );
76
        }
77
    }
78
79
    /**
80
     * {@inheritdoc}