These are not really variables. They are never modified, and not
meant to be modified. Using "static" was a common workaround
when we had no private constants in PHP.
Change-Id: Ie1234ce8833986431be95f8537282fa174978063
Html::open/closeElement are hard to read and possibly error
prone. We can easily avoid it in this case here.
Change-Id: I2251cb63e58bc132ced0bb684e3f0e3be35ab1aa
* eslint-config-wikimedia: 0.16.2 → 0.17.0
The following rules are failing and were disabled:
* no-shadow
* grunt: 1.2.1 → 1.3.0
Change-Id: Id43b02523bb5e0a706f64c1a40d1c1841aa3d345
No subclass is directly using these. They don't need to be
protected. There are getters, if needed.
Change-Id: I27dcb8bee37b9559242451774c52240b490a18af
In detail:
* Callers don't need to know that the return value can be a
TemplateDataCompressedBlob. All relevant stuff is declared in
the base class.
* It's not relevant which internal method returned the status.
It's just the status of the object after it was constructed.
* "stdClass" is more specific. "object" includes more stuff
which can't be returned here.
* Avoid duplication and use @inheritDoc instead.
Change-Id: I68878a5b26ecd566fbea88b513ee697b45769659
In detail:
* Mark both as protected and make them call each other.
* Avoid duplication.
* Remove unused "null" default value.
Change-Id: I272a68bb3cc0c544ef306b16c2998458c2eb1a2d
Notes:
* In PHP, when a function parameter does have a strict type,
all it does is forcefully casting the value to this type. It
doesn't cause warnings.
* Violating a strict return type causes a warning.
* I'm intentionally not touching places where the result from
json_decode() is passed through. In theory this could be
anything. Let's update these later, after more refactoring
is done.
Change-Id: I9a203356f70cf9edd434f7dc4ca130c2b7605ab4
This does not have any effect on how this code behaves. It's
only relevant when a human reads the code. I tried to bring the
properties in an order that makes the most sense, grouping stuff
that clearly belongs together, as well as following how stuff is
ordered on
https://www.mediawiki.org/wiki/Extension:TemplateData
Change-Id: Ibbe1027023f8d87bbd0a70411882a25671918670
Seperate different maps of maps-object into different panels that
contains text-area to edit the map, delete button to delete the map, and
can be navigated through using a side-bar, that also have "Add new map"
button at the top to add a new map.
Bug: T258820
Change-Id: Ib53a73203f6010b3fd8a5cd78c74c904be2340f2
"Unknown" is the special, default value when nothing else is
specified. It feels wrong to find this in alphabetical order
between all the other values, as if "Unknown" is something I'm
expected to pick. While this is possible, it's almost never
necessary. "Unknown" is the default anyway. If I'm fine with
that, I never change it. But if I want to pick something else,
I typically expect the list to show the "nothing selected yet"
default first so I can easily avoid it.
Change-Id: I283a1b0545efba208af777a0b2056740263dfc32
Both styles create the exact same object. Casting an array to an
object creates an stdClass object as well. The main benefit of this
syntax is that there is much less repetition. Everything is one
token instead of individual lines, where each line might contain a
typo.
Change-Id: I8fb09e9d33e5a1d91d4b32a71f658b31c629987b
In detail:
* Don't pass the Parser by reference. Hook handlers don't need to
replace the object with another one, and shouldn't.
* Use __CLASS__ instead of repeating the class name.
* Returning true from a hook is meaningless and indistinguishable
from the default.
Change-Id: Iac60f7f4946eb78cfb3b579fcdb1cab8bdcac7cd
This is used by the includeMissingTitles option of API action=templatedata.
Parameter syntax existing within nowiki tags or comments will not be valid
for the template.
Bug: T237195
Change-Id: Ibbfa3e21488f2a37fc494862e929baf50607d4c9