-
Notifications
You must be signed in to change notification settings - Fork 40
test: bump phpstan to v2 #1263
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
base: master
Are you sure you want to change the base?
test: bump phpstan to v2 #1263
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -56,7 +56,7 @@ class OCSEndPoint { | |
| protected $objectId; | ||
|
|
||
| /** @var string */ | ||
| protected $user; | ||
| protected $user = ''; | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There were potential ways to access (Some day we could really declare all the types, and enable strict_types, etc.) |
||
|
|
||
| /** @var bool */ | ||
| protected $loadPreviews; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -53,6 +53,8 @@ public function parseMessage($message) { | |
| * @return string | ||
| */ | ||
| protected function parseCollections($message) { | ||
| // @phpstan-ignore nullCoalesce.variable | ||
| $message = $message ?? ''; | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The unit tests managed to call down to here with
|
||
| return \preg_replace_callback('/<collection>(.*?)<\/collection>/', function ($match) { | ||
| $parameterList = \explode('><', $match[1]); | ||
| $parameterListLength = \sizeof($parameterList); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| { | ||
| "require": { | ||
| "phan/phan": "^5.4" | ||
| "phan/phan": "^5.5" | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| { | ||
| "require": { | ||
| "phpstan/phpstan": "^1.10" | ||
| "phpstan/phpstan": "^2.2" | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
phpstan reported that
$batchCountwas always greater than 0 when evaluated at thewhilebelow.That was true, because the (only) way out of this loop was the early
breakabove.I have refactored this loop so that
while ($batchCount > 0)is actually the place where the decision to exit the loop is made.