Page MenuHomePhabricator

Fix documentation for Context methods (OT)
Closed, ResolvedPublic2 Estimated Story Points

Description

The method Context::getElection can return an Election object or false; however, it is documented only to return an Election object.

The documentation should be fixed to say:

@return Election|bool

The @return documentation for Context::getElectionByTitle and Context::newFromXmlFile should also be fixed to say bool instead of false.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Niharika set the point value for this task to 2.Feb 11 2021, 5:28 PM

Change 664837 had a related patch set uploaded (by AGueyte; owner: AGueyte):
[mediawiki/extensions/SecurePoll@master] Fix documentation for Context methods

https://gerrit.wikimedia.org/r/664837

Change 664837 merged by jenkins-bot:
[mediawiki/extensions/SecurePoll@master] Fix documentation for Context methods

https://gerrit.wikimedia.org/r/664837

@AGueyte Thanks for fixing this - I see it's been merged!

Would you mind also fixing the documentation for Context::getElectionByTitle and Context::newFromXmlFile to say bool instead of false? It can be in a new commit, tagged against this task.

Change 665351 had a related patch set uploaded (by AGueyte; owner: AGueyte):
[mediawiki/extensions/SecurePoll@master] Fix documentation for Context functions

https://gerrit.wikimedia.org/r/665351

Change 665351 merged by jenkins-bot:
[mediawiki/extensions/SecurePoll@master] Fix documentation for Context functions

https://gerrit.wikimedia.org/r/665351