Code Duplication    Length = 13-13 lines in 2 locations

src/Loader/PHPLoader.php 1 location

@@ 87-99 (lines=13) @@
84
     * @return string Validated URI.
85
     * @throws FailedToLoadConfigException If the URI does not exist or is not readable.
86
     */
87
    protected function validateUri($uri)
88
    {
89
        if (! is_readable($uri)) {
90
            throw new FailedToLoadConfigException(
91
                sprintf(
92
                    _('The requested PHP config file "%1$s" does not exist or is not readable.'),
93
                    $uri
94
                )
95
            );
96
        }
97
98
        return $uri;
99
    }
100
}
101

src/Loader/JSONLoader.php 1 location

@@ 85-97 (lines=13) @@
82
     * @return string Validated URI.
83
     * @throws FailedToLoadConfigException If the URI does not exist or is not readable.
84
     */
85
    protected function validateUri($uri)
86
    {
87
        if (! is_readable($uri)) {
88
            throw new FailedToLoadConfigException(
89
                sprintf(
90
                    _('The requested JSON config file "%1$s" does not exist or is not readable.'),
91
                    $uri
92
                )
93
            );
94
        }
95
96
        return $uri;
97
    }
98
}
99