Page MenuHomePhabricator

Fix errors found by PHPStan
ClosedPublic

Authored by vrana on Feb 16 2017, 3:09 PM.
Tags
None
Referenced Files
F19022726: D17371.id.diff
Nov 23 2025, 10:10 PM
F19014223: D17371.diff
Nov 22 2025, 7:00 PM
F18857656: D17371.id.diff
Nov 1 2025, 4:59 PM
F18840874: D17371.diff
Oct 28 2025, 4:31 AM
F18833779: D17371.id41769.diff
Oct 26 2025, 5:45 AM
F18830666: D17371.id41776.diff
Oct 25 2025, 7:57 AM
F18815089: D17371.id.diff
Oct 21 2025, 12:48 AM
F18810062: D17371.diff
Oct 19 2025, 7:13 PM
Subscribers

Details

Test Plan

Ran phpstan analyze -a autoload.php phabricator/src.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley added inline comments.
src/applications/calendar/__tests__/CalendarTimeUtilTestCase.php
10

This test case is no longer doing anything with $day so I think it can't be right, but I can try to figure that out and follow up.

src/applications/calendar/storage/PhabricatorCalendarExternalInvitee.php
13–19

We should just remove this: it has no callsites and was improperly copy-pasted. This object has no status, inviterPHID, etc., properties, so this code will fatal even with this fix.

src/applications/conpherence/conduit/ConpherenceCreateThreadConduitAPIMethod.php
52–53

I think this case can just be removed instead. Conpherence threads are no longer required to have a title (if they don't, we'll create a default one by listing the participants) and I think this just never got cleaned up.

ERROR_EMPTY_MESSAGE should be impossible when creating a thread and I think it only refs to sending an empty message to an existing thread.

This revision is now accepted and ready to land.Feb 16 2017, 4:12 PM

Address feedback

src/applications/calendar/__tests__/CalendarTimeUtilTestCase.php
10

I've changed it to getTimestamps($u, $day, 1) and the test now passes.

src/applications/calendar/storage/PhabricatorCalendarExternalInvitee.php
13–19

Note that it returns PhabricatorCalendarEventInvitee, not PhabricatorCalendarExternalInvitee. I'll submit it like this and let you follow up.

src/applications/conpherence/conduit/ConpherenceCreateThreadConduitAPIMethod.php
52–53

Removed.

This revision was automatically updated to reflect the committed changes.