PLURAL magic word expects formatted numbers, so just format them
in the code already, as is common practice.
Change-Id: I813c45f8959d9d013a6176e999622c81f7e86042
The $this->data property stores whatever json_decode() returned,
which could be anything. The validation happens later.
Change-Id: I0d04831b8253005734c1c6c97b48061be35e5d88
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