CategoryTree::makeTitle also makes a trim and an early return.
A trim on the return value of renderChildren() is not needed.
Change-Id: I1fc2705277491797eb6c0d0900152b63913ca875
* Add PHP type hints where possible.
* Remove @var, @param and @return if redundant to type declaration
* Remove redundant type conversions which are now enforced by type
hints.
* Enforce that decodeBoolean returns only a bool.
Change-Id: I8da84ed4dc778dd9d84f8d9eec0a399f5ed26405
* All option values are not expected be object themselves.
* Allow 'namespace' option to take scalar or array value.
* All other options take scalar values only.
Bug: T335145
Change-Id: I3bdb284f26d0c9ee8230f2197b168a7e83c145c3
Deprecated methods that have been replaced are;
* ConfigFactory::getDefaultInstance()
* wfMemcKey()
This extension uses 1.33 of core and these replacements
are safe.
Change-Id: I1536ab2adecc79fd42b46e2c892dae4a536c9496
It has origins in times when this code was in an AJAX function, however
now that it's in an API module it's not needed and can be counter-productive
as headers issued might conflict with MW headers. Let the API take care of
this via its standard means.
Change-Id: I8ebf8e7b935d7d252ac010bc1b88202b87f43e20
* Add @inheritDoc to functions that are inheritance.
* Move comments to a single line.
Remove the phpcs rule exceptions:
* MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected
* MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic
* MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment
Change-Id: I742ee19f0a3d2d62e08b6f2e35cd9a6b3940cd22
When giving an invalid title, for example containing double encoded %
(%2527 from the task), the code would raise a BadMethodCallException on
the null title.
It is better to get an api error, when invalid title is given, because
that is more informativ for the client than a php fatal
Bug: T202057
Change-Id: I7af2a8d072216eca8d3241b2c082089a78fbf621