Skip to content

Commit 4bc0e43

Browse files
committed
Remove unused constant
1 parent 0fac330 commit 4bc0e43

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

uri/Uri.php

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -103,15 +103,6 @@ final class Uri implements Conditionable, UriInterface, UriRenderer, UriInspecto
103103
*/
104104
private const REGEXP_INVALID_CHARS = '/[\x00-\x1f\x7f]/';
105105

106-
/**
107-
* RFC3986 schema regular expression pattern.
108-
*
109-
* @link https://tools.ietf.org/html/rfc3986#section-3.1
110-
*
111-
* @var string
112-
*/
113-
private const REGEXP_SCHEME = ',^[a-z]([-a-z\d+.]+)?$,i';
114-
115106
/**
116107
* RFC3986 host identified by a registered name regular expression pattern.
117108
*
@@ -330,7 +321,7 @@ private function formatScheme(?string $scheme): ?string
330321

331322
if (
332323
!array_key_exists($formattedScheme, self::SCHEME_DEFAULT_PORT)
333-
&& 1 !== preg_match(self::REGEXP_SCHEME, $formattedScheme)
324+
&& !UriString::isScheme($formattedScheme)
334325
) {
335326
throw new SyntaxError('The scheme `'.$scheme.'` is invalid.');
336327
}

0 commit comments

Comments
 (0)