StatusValue is a wrapper over a value with optional errors/warnings. It should support fluent interface so that instead of
$status = StatusValue::newGood(); // Some time later $status->fatal( 'blablabla' ); return $status;
We could do
$status = StatusValue::newGood(); // Some time later return $status->fatal( 'blablabla' );
Theres a lot of other usage patterns that would benefit from StatusValue being fluent.
This tasks consists of 3 parts:
- Identify which methods of the StatusValue class are setters
- Convert it to fluent interface
- Find some usages in core where we could benefit from it being fluent and replace them.