-
Notifications
You must be signed in to change notification settings - Fork 819
Increase psalm strictness #925
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ab3200d
to
50b82d3
Compare
ERROR: PossiblyUndefinedArrayOffset - ../src/Curl/Curl.php:1890:28 - Possibly undefined array key (see https://psalm.dev/167) list($key, $value) = explode(':', $raw_headers[$i], 2);
ERROR: PossiblyUndefinedArrayOffset - ../src/Curl/Curl.php:1034:28 - Possibly undefined array key (see https://psalm.dev/167) list($key, $value) = explode(':', $header, 2);
ERROR: PossiblyUndefinedArrayOffset - ../src/Curl/MultiCurl.php:465:28 - Possibly undefined array key (see https://psalm.dev/167) list($key, $value) = explode(':', $header, 2);
ERROR: PossiblyInvalidOperand - ../src/Curl/Curl.php:1407:69 - Cannot concatenate with a int<0, max>|string (see https://psalm.dev/163) echo 'Response content length (calculated): ' . $response_calculated_length . "\n";
ERROR: PossiblyInvalidArgument - ../src/Curl/BaseCurl.php:408:34 - Argument 2 of define expects array<array-key, mixed>|null|scalar, but possibly different type false|resource provided (see https://psalm.dev/092) define('STDERR', fopen('php://stderr', 'wb'));
ERROR: ArgumentTypeCoercion - ../src/Curl/MultiCurl.php:956:16 - Argument 1 of usleep expects int<0, max>, but parent type int provided (see https://psalm.dev/193) usleep((int) $sleep_seconds * 1000000);
ERROR: PossiblyFalseArgument - ../src/Curl/MultiCurl.php:131:50 - Argument 2 of file_put_contents cannot be false, possibly array<array-key, string>|resource|string value expected (see https://psalm.dev/104) file_put_contents($filename, stream_get_contents($fh));
ERROR: PossiblyFalseArgument - ../src/Curl/Curl.php:437:49 - Argument 2 of stream_copy_to_stream cannot be false, possibly resource value expected (see https://psalm.dev/104) stream_copy_to_stream($tmpfile, $fh); ERROR: PossiblyFalseArgument - ../src/Curl/Curl.php:438:24 - Argument 1 of fclose cannot be false, possibly resource value expected (see https://psalm.dev/104) fclose($fh);
ERROR: PossiblyFalseArgument - ../src/Curl/Curl.php:463:49 - Argument 2 of stream_copy_to_stream cannot be false, possibly resource value expected (see https://psalm.dev/104) stream_copy_to_stream($file_handle, $main_file_handle); ERROR: PossiblyFalseArgument - ../src/Curl/Curl.php:468:16 - Argument 1 of fclose cannot be false, possibly resource value expected (see https://psalm.dev/104) fclose($main_file_handle);
ERROR: PossiblyFalseArgument - ../src/Curl/Curl.php:1891:36 - Argument 1 of count cannot be false, possibly Countable|array<array-key, mixed> value expected (see https://psalm.dev/104) $raw_headers_count = count($raw_headers); ERROR: PossiblyInvalidArrayAccess - ../src/Curl/Curl.php:1893:24 - Cannot access array value on non-array variable $raw_headers of type false (see https://psalm.dev/109) if (strpos($raw_headers[$i], ':') !== false) {
ERROR: PossiblyInvalidArgument - ../src/Curl/Curl.php:1868:30 - Argument 2 of define expects array<array-key, mixed>|null|scalar, but possibly different type false|resource provided (see https://psalm.dev/092) define('STDOUT', fopen('php://stdout', 'w'));
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.