Page MenuHomePhabricator

Basic cleanup of PHP code in preparation for refined <ref>s
Closed, ResolvedPublic8 Estimated Story Points

Description

Basic cleanup of the existing PHP code, apply current best practices. There is a lot of very ugly code, esp. callbacks like [ $obj, 'method' ], as well as a dynamically created attribute stuffed in the Parser! At least make sure each issue is local, in as few places as possible.

Limit scope of cleanup to the code we probably need to touch.

Original estimation: 8

Event Timeline

thiemowmde set the point value for this task to 8.Oct 24 2019, 7:17 AM

Change 546104 had a related patch set uploaded (by Thiemo Kreuz (WMDE); owner: Thiemo Kreuz (WMDE)):
[mediawiki/extensions/Cite@master] Make use of ctype_digit() instead of a regex

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

Change 546106 had a related patch set uploaded (by Thiemo Kreuz (WMDE); owner: Thiemo Kreuz (WMDE)):
[mediawiki/extensions/Cite@master] Simplify private listToText() implementation

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

Change 546107 had a related patch set uploaded (by Thiemo Kreuz (WMDE); owner: Thiemo Kreuz (WMDE)):
[mediawiki/extensions/Cite@master] Make use of PHP7's ?? feature instead of isset()

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

Change 546104 merged by jenkins-bot:
[mediawiki/extensions/Cite@master] Make use of ctype_digit() instead of a regex

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

Change 546108 had a related patch set uploaded (by Thiemo Kreuz (WMDE); owner: Thiemo Kreuz (WMDE)):
[mediawiki/extensions/Cite@master] Streamline Hooks section in extension.json

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

Change 546106 merged by jenkins-bot:
[mediawiki/extensions/Cite@master] Simplify private listToText() implementation

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

Change 546110 had a related patch set uploaded (by Thiemo Kreuz (WMDE); owner: Thiemo Kreuz (WMDE)):
[mediawiki/extensions/Cite@master] Move misplaced ParserFirstCallInit hook handler to CiteHooks

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

Change 546108 merged by jenkins-bot:
[mediawiki/extensions/Cite@master] Streamline Hooks section in extension.json

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

Change 546107 merged by jenkins-bot:
[mediawiki/extensions/Cite@master] Make use of PHP7's ?? feature instead of isset()

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

Change 546119 had a related patch set uploaded (by Thiemo Kreuz (WMDE); owner: Thiemo Kreuz (WMDE)):
[mediawiki/extensions/Cite@master] Move unrelated static code to ApiQueryReferences

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

Change 546110 merged by jenkins-bot:
[mediawiki/extensions/Cite@master] Move misplaced ParserFirstCallInit hook handler to CiteHooks

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

Change 546119 merged by jenkins-bot:
[mediawiki/extensions/Cite@master] Move unrelated static code to ApiQueryReferences

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

thiemowmde claimed this task.

Further refactoring will be done as part of specific Cite-Extends tickets.