feat: Add OCP interface to format richtext into string#48137
Conversation
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
| $replacements = []; | ||
| foreach ($parameters as $placeholder => $parameter) { | ||
| $placeholders[] = '{' . $placeholder . '}'; | ||
| foreach (['name','type'] as $requiredField) { |
There was a problem hiding this comment.
| foreach (['name','type'] as $requiredField) { | |
| foreach (['name', 'type'] as $requiredField) { |
There was a problem hiding this comment.
why is this not covered by cs-fixed? 👀
There was a problem hiding this comment.
There was a problem hiding this comment.
Because this change is not flagged an cs error
There was a problem hiding this comment.
But do we have a rule for this?
The code @nickvergessen mentioned is only there to ignore git-ignored files.
There was a problem hiding this comment.
This is an array, not a function call so a space is not expected there I think
There was a problem hiding this comment.
But I agree that we should have a rule for it.
| /** | ||
| * @since 31.0.0 | ||
| * @param string $message | ||
| * @param array<string,array<string,string>> $parameters |
There was a problem hiding this comment.
| * @param array<string,array<string,string>> $parameters | |
| * @param array<string, array<string, string>> $parameters |
There was a problem hiding this comment.
I’m always afraid to break tools by doing that because the type and the name of the parameter is space separated to adding space in the type looks wrong.
|
Otherwise good and looking forward to it |
Summary
Adds an interface into OCP to format richtext into a string, fixing a code duplication from activity, notifications and setupchecks.
Solves this TODO:
server/core/Command/SetupChecks.php
Line 33 in f8dde2d
Checklist