Make the PHPDoc @return say so when the method can also return null instead of an, array, string, or int.
(In case of getCommandHelp(), return an empty string as child implementations do return strings.)
Details
Details
- Reviewers
valerio.bozzolan - Group Reviewers
O1: Blessed Committers - Commits
- rARCc01198d55f6d: Correct PHPDoc @return value of methods that can return null
Read the code; run static code analysis.
Diff Detail
Diff Detail
- Repository
- rARC Arcanist
- Branch
- phpdocCanReturnNull
- Lint
Lint Passed - Unit
Test Failures - Build Status
Buildable 1581 Build 1581: arc lint + arc unit
Time | Test | |
---|---|---|
724 ms | ArcanistBundleTestCase::testGitRepository EXCEPTION (Exception): Expected patch and actual patch for 5dec8bf28557f078d1987c4e8cfb53d08310f522 differ. Wrote actual patch to '/var/www/html/phorge/arcanist/src/parser/__tests__/patches//5dec8bf28557f078d1987c4e8cfb53d08310f522.gitpatch.real'.
#0 /var/www/html/phorge/arcanist/src/parser/__tests__/ArcanistBundleTestCase.php(85): ArcanistBundleTestCase->runGitRepositoryTests(Object(PhutilDirectoryFixture))
#1 /var/www/html/phorge/arcanist/src/unit/engine/phutil/PhutilTestCase.php(639): ArcanistBundleTestCase->testGitRepository()
| |
75 ms | AbstractDirectedGraphTestCase::testCyclicGraph 1 assertion(s) passed. | |
76 ms | AbstractDirectedGraphTestCase::testEdgeLoadFailure 1 assertion(s) passed. | |
75 ms | AbstractDirectedGraphTestCase::testNonTreeGraph 1 assertion(s) passed. | |
75 ms | AbstractDirectedGraphTestCase::testNoncyclicGraph 1 assertion(s) passed. | |
View Full Test Results (1 Failed · 210 Passed) |
Event Timeline
src/workflow/ArcanistWorkflow.php | ||
---|---|---|
293 ↗ | (On Diff #2424) | I agree but probably we should update also something else, like this check that originally was a "not empty, not null, not objects without a toString()" check and instead now it's just "not null": (that line was changed during b50a646a3f49) The question may be: is there any Workflow out of there without an help command? If the answer is "maybe yes" let's update ArcanistWorkflow.php and adopt:
|
Comment Actions
Leave out special case src/workflow/ArcanistWorkflow.php for now
@valerio.bozzolan: Let's please move that case to a separate issue - thanks! :)