HomePhabricator

Improve code quality

Description

Improve code quality

Resolve dangling secondary link issues
Rework GlobalPreferences to prevent duplicate notifications
Use string to represent nullable boolean pref
Eligibility check logic is now testable function
Correct namespace bugs
Prune unused functions in PreferenceHelper
Check extensions in TheWikipediaLibraryHooks
Tests cover eligibility, not page saves
Add typehints and return types in hooks and prefs helpers
Use namespace MediaWiki\Extension\TheWikipediaLibrary
Mock globals in tests
Use LoggerFactory, not wfLogWarning
Replace deprecated phpunit setMethods with onlyMethods
Add typehint and return type in isTwlEligible

Bug: T256297
Change-Id: I76d587e1e8b9894231ec34de0a395a9df9251441

Details

Provenance
jsn <jsherman@wikimedia.org>Authored on Apr 1 2021, 3:45 PM
Parents
rEWPLd63c892840d0: build: Updating eslint-config-wikimedia to 0.20.0
Branches
Unknown
Tags
Unknown
ChangeId
I76d587e1e8b9894231ec34de0a395a9df9251441

Event Timeline

jsn <jsherman@wikimedia.org> committed rEWPL84f7fc095837: Improve code quality (authored by jsn <jsherman@wikimedia.org>).Tue, May 4, 6:44 PM