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 = 19-19 lines in 2 locations

src/AbstractLogger.php 1 location

@@ 32-50 (lines=19) @@
29
     * @return string
30
     * @throws Exception\InvalidArgumentException
31
     */
32
    public static function validateLogFile($logFile, $logDir)
33
    {
34
        // Is logFile a stream url?
35
        if (strpos($logFile, '://') !== false) {
36
            return $logFile;
37
        }
38
39
        if (! file_exists($logDir) || ! is_writable($logDir)) {
40
            throw new Exception\InvalidArgumentException("Log dir {$logDir} must exist and be writable!");
41
        }
42
43
        $fileName = $logDir.DIRECTORY_SEPARATOR.$logFile;
44
45
        if (file_exists($fileName) && ! is_writable($fileName)) {
46
            throw new Exception\InvalidArgumentException("Log file {$fileName} must be writable!");
47
        }
48
49
        return $fileName;
50
    }
51
}
52

src/LoggerFactory.php 1 location

@@ 42-60 (lines=19) @@
39
     * @return string
40
     * @throws Exception\InvalidArgumentException
41
     */
42
    public static function validateLogFile($logFile, $logDir)
43
    {
44
        // Is logFile a stream url?
45
        if (strpos($logFile, '://') !== false) {
46
            return $logFile;
47
        }
48
49
        if (! file_exists($logDir) || ! is_writable($logDir)) {
50
            throw new Exception\InvalidArgumentException("Log dir {$logDir} must exist and be writable!");
51
        }
52
53
        $fileName = $logDir.DIRECTORY_SEPARATOR.$logFile;
54
55
        if (file_exists($fileName) && ! is_writable($fileName)) {
56
            throw new Exception\InvalidArgumentException("Log file {$fileName} must be writable!");
57
        }
58
59
        return $fileName;
60
    }
61
}
62