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

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