File tree Expand file tree Collapse file tree 4 files changed +4
-10
lines changed Expand file tree Collapse file tree 4 files changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -6,10 +6,3 @@ parameters:
66 parallel :
77 maximumNumberOfProcesses : 1
88 treatPhpDocTypesAsCertain : false
9- ignoreErrors :
10- -
11- message : ' %Parameter #1 \$value of method Zaphyr\\HttpMessage\\Uri::sanitizeQueryOrFragment\(\) expects string, string\|null given.%'
12- path : ' src/Uri.php'
13- -
14- message : ' %Parameter #2 \$length of function fread expects int<0, max>, int given.%'
15- path : ' src/Stream.php'
Original file line number Diff line number Diff line change @@ -257,6 +257,7 @@ public function read(int $length): string
257257 throw new RuntimeException ('Stream is not readable ' );
258258 }
259259
260+ /** @var int<1, max> $length */
260261 $ result = fread ($ this ->resource , $ length );
261262
262263 if ($ result === false ) {
Original file line number Diff line number Diff line change @@ -131,7 +131,7 @@ public function moveTo(string $targetPath): void
131131 );
132132 }
133133
134- if (!$ this ->file || empty ( PHP_SAPI ) || str_starts_with ( PHP_SAPI , 'cli ' ) ) {
134+ if (!$ this ->file || PHP_SAPI === 'cli ' ) {
135135 $ handle = fopen ($ targetPath , 'wb+ ' );
136136
137137 if ($ handle === false ) {
Original file line number Diff line number Diff line change @@ -379,13 +379,13 @@ private function sanitizeQuery(string $query): string
379379 [$ key , $ value ] = $ this ->splitQueryValue ($ part );
380380
381381 if ($ value === null ) {
382- $ parts [$ index ] = $ this ->sanitizeQueryOrFragment ($ key );
382+ $ parts [$ index ] = $ this ->sanitizeQueryOrFragment (( string ) $ key );
383383 continue ;
384384 }
385385
386386 $ parts [$ index ] = sprintf (
387387 '%s=%s ' ,
388- $ this ->sanitizeQueryOrFragment ($ key ),
388+ $ this ->sanitizeQueryOrFragment (( string ) $ key ),
389389 $ this ->sanitizeQueryOrFragment ($ value )
390390 );
391391 }
You can’t perform that action at this time.
0 commit comments