Repository navigation
Conversation
This will allow the tests to work offline or if the servers have an outage, and they will not break if the site changes.
Reported by PHPStan
Reported by PHPStan.
`parseImg` can return `array` in which case we would not resolve the URL properly.
This is already declared using native PHP keyword.
Performed automatically using Rector.
PHP would complain about passing `false` to `substr` with `strict_types` enabled.
To catch type errors rather than having PHP silently mangle the data and maybe do something incorrect.
To satisfy PHPStan level 2.
Performed automatically using rector.
Level 3 would complain:
Parameter &$dtValue by-ref type of function Mf2\normalizeTimezoneOffset() expects string, string|null given.
Level 4 would compain:
If condition is always true.
Because the method will throw an error on failure on PHP 8.1.0+ but will return false on older versions.
Level 4 would complain:
Property DOMElement::$tagName (string) in isset() is not nullable.
But the property has always been non-null:
https://web.archive.org/web/20130818013638/http://www.php.net/manual/en/class.domelement.php#domelement.props.tagname
Level 5 complains:
function curl_setopt expects bool, int given.
Level 6 would complain:
Method … return type has no value type specified in iterable type array.
Level 6 would complain:
Method … has parameter $… with no type specified.
Level 6 would complain about missing return type. Let’s copy it from the parent function.
Fixes more PHPStan Level 6 complaints.
Fixes more PHPStan Level 6 complaints.
Fixes more PHPStan Level 6 complaints.
`parseRecursive(…, depth: 0)` always returns an array of non-empty arrays. This will be pointed out by PHPStan once we adjust PHPDoc.
Fixes more PHPStan Level 6 complaints.
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
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.
Part of PR stack:
/..#297