| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Applied return type hints to improve type safety in Message classes.
Adjusted constructors to specify parameter types for consistency.
Enhanced `newFromJsonArray` in `ScalarParam`, `DataMessageValue`,
and `MessageParam` to clarify deserialization logic.
Key updates:
- Added `: string` return types for `getLangCode`, `getKey`, `dump`.
- Added `: array` return type for `getParams`, `getData`, `toJsonArray`.
- Revised `ScalarParam` JSON parsing to ensure a consistent return.
These adjustments enhance type safety across the Message classes.
Depends-On: Id7cc576693f5f1830e1d261cb13c626c901fb40f
Depends-On: I260e3f526be10f7b11e5c77a1e300590c6fc5b2b
Depends-On: I3c318273856d15407c71cb9b4ab7c23a0debb314
Change-Id: I7e50be91c01b4b70e1d1380651f001e35bd60523
|
|
|
|
| |
Change-Id: I8ed6498acb4657c69b58a24fc3cc45f585a31b7d
|
|
|
|
|
|
|
|
|
|
| |
Add doc-typehints to class properties found by the PropertyDocumentation
sniff to improve the documentation.
Once the sniff is enabled it avoids that new code is missing type
declarations. This is focused on documentation and does not change code.
Change-Id: I46f46f1855ca32c89a276b06f4e2051ff541886e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MessageValue and friends are pure value objects and newable, so
it makes sense for them to be (de)serializable too. There are some
places where we want to serialize messages, such as in ParserOutput.
The structure of the resulting JSON is inspired by the way we
represent Message objects as plain values elsewhere in MediaWiki,
e.g. StatusValue::getStatusArray().
Co-Authored-By: C. Scott Ananian <cscott@cscott.net>
Depends-On: Ia32f95a6bdf342262b4ef044140527f0676402b9
Depends-On: I7bafe80cd36c2558517f474871148286350a4e76
Change-Id: Id47d58b5e26707fa0e0dbdd37418c0d54c8dd503
|
|
|
|
|
|
|
|
|
|
|
|
| |
Among other things, this removed mention of MediaWiki classes from the
library and adds a README.md that attempts to define constraints for
interoperability between libraries producing MessageValues and formatter
implementations that are expected to handle them.
This also renames "TextParam" to "ScalarParam", as that seems a more
accurate name for the class.
Change-Id: I264dd4de394d734a87929cf4740779e7b7d0e04a
|
|
An injectable service interface for message formatting, somewhat
narrowed compared to Message.
Only the text format is implemented in this framework so far, with
getTextFormatter() returning a formatter that converts to the text
format. Other formatters could be added to MessageFormatterFactory.
Bug: T226598
Change-Id: Id053074c1dbcb692e8309fdca602f94a385bca0c
|