Skip to content

[4.x] Remove Unreachable return in PHPUnit test stubs#1423

Merged
taylorotwell merged 16 commits intolaravel:4.xfrom
nathanheffley:4.x
Dec 26, 2023
Merged

[4.x] Remove Unreachable return in PHPUnit test stubs#1423
taylorotwell merged 16 commits intolaravel:4.xfrom
nathanheffley:4.x

Conversation

@nathanheffley
Copy link
Contributor

$this->markTestSkipped() is used in many PHPUnit tests to skip testing disabled features, and throws an exception to immediately end the test. However, there is also an unreachable return statement after every call to markTestSkipped. This causes static analysis tools like PHPStan that are looking for dead code to trigger on the tests until someone cleans them up. Since they are functionally irrelevant, it'd be nice to clean up the stubs and drop the return statements.

@taylorotwell taylorotwell merged commit 108e2ce into laravel:4.x Dec 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants