File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -192,7 +192,7 @@ public function getAuthority():string{
192192 * @inheritDoc
193193 */
194194 public function getUserInfo ():string {
195- return ( string ) $ this ->user .($ this ->pass != '' ? ': ' .$ this ->pass : '' );
195+ return $ this ->user .($ this ->pass != '' ? ': ' .$ this ->pass : '' );
196196 }
197197
198198 /**
@@ -283,6 +283,7 @@ protected function filterPort($port):?int{
283283 }
284284
285285 $ port = (int )$ port ;
286+
286287 if ($ port >= 1 && $ port <= 0xffff ){
287288 return $ port ;
288289 }
@@ -468,12 +469,10 @@ protected function parseUriParts(array $parts):void{
468469 * @return string
469470 */
470471 protected function replaceChars (string $ str , bool $ query = null ):string {
471- /** @noinspection RegExpRedundantEscape */
472+ /** @noinspection RegExpRedundantEscape, RegExpUnnecessaryNonCapturingGroup */
472473 return preg_replace_callback (
473474 '/(?:[^a-z\d_\-\.~!\$& \'\(\)\*\+,;=%:@\/ ' .($ query ? '\? ' : '' ).']++|%(?![a-f\d]{2}))/i ' ,
474- function (array $ match ):string {
475- return rawurlencode ($ match [0 ]);
476- },
475+ fn (array $ match ):string => rawurlencode ($ match [0 ]),
477476 $ str
478477 );
479478
You can’t perform that action at this time.
0 commit comments