Code Duplication    Length = 13-13 lines in 2 locations

src/Loader/JSONLoader.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/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