Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix too wide bool in trivial methods #4444

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

Open
staabm wants to merge 10 commits into phpstan:2.1.x
base: 2.1.x
Choose a base branch
Loading
from staabm:bug13482
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Discard changes to tests/PHPStan/Rules/TooWideTypehints/TooWideFuncti...
...onReturnTypehintRuleTest.php
  • Loading branch information
staabm committed Oct 29, 2025
commit cc45c51597bf1dba8139f8cb4567bb4d90825f68
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,20 @@ public function testBug13384cPhp82(): void
$this->reportNestedTooWideType = true;
$this->analyse([__DIR__ . '/data/bug-13384c.php'], [
[
'Function Bug13384c\callsReturnsTrue() never returns false so the return type can be changed to true.',
115,
'Function Bug13384c\doFoo() never returns true so the return type can be changed to false.',
5,
],
[
'Function Bug13384c\doFoo2() never returns false so the return type can be changed to true.',
9,
],
[
'Function Bug13384c\doFooPhpdoc() never returns false so the return type can be changed to true.',
93,
],
[
'Function Bug13384c\doFooPhpdoc2() never returns true so the return type can be changed to false.',
100,
],
]);
}
Expand All @@ -90,7 +102,16 @@ public function testBug13384cPrePhp82(): void
{
$this->reportTooWideBool = true;
$this->reportNestedTooWideType = true;
$this->analyse([__DIR__ . '/data/bug-13384c.php'], []);
$this->analyse([__DIR__ . '/data/bug-13384c.php'], [
[
'Function Bug13384c\doFooPhpdoc() never returns false so the return type can be changed to true.',
93,
],
[
'Function Bug13384c\doFooPhpdoc2() never returns true so the return type can be changed to false.',
100,
],
]);
}

public function testBug13384cOff(): void
Expand Down

AltStyle によって変換されたページ (->オリジナル) /