[TOOLS] Continue raising PHPStan level to 6

This commit is contained in:
2022-10-19 22:39:17 +01:00
parent c31f3d4997
commit 2fd46ca886
89 changed files with 646 additions and 278 deletions

View File

@@ -95,11 +95,13 @@ class Conversation extends Component
* HTML rendering event that adds a reply link as a note
* action, if a user is logged in.
*
* @param \App\Entity\Note $note The Note being rendered
* @param array $actions Contains keys 'url' (linking 'conversation_reply_to'
* route), 'title' (used as title for aforementioned url),
* 'classes' (CSS styling classes used to visually inform the user of action context),
* 'id' (HTML markup id used to redirect user to this anchor upon performing the action)
* @param \App\Entity\Note $note The Note being rendered
* @param array{url: string, title: string, classes: string, id: string} $actions
* Contains keys 'url' (linking 'conversation_reply_to' route),
* 'title' (used as title for aforementioned url), 'classes' (CSS styling
* classes used to visually inform the user of action context), 'id' (HTML
* markup id used to redirect user to this anchor upon performing the
* action)
*
* @throws \App\Util\Exception\ServerException
*/
@@ -138,8 +140,11 @@ class Conversation extends Component
/**
* Append on note information about user actions.
*
* @param array $vars Contains information related to Note currently being rendered
* @param array $result Contains keys 'actors', and 'action'. Needed to construct a string, stating who ($result['actors']), has already performed a reply ($result['action']), in the given Note (vars['note'])
* @param array<string, mixed> $vars Contains information related to Note currently being rendered
* @param array{actors: Actor[], action: string} $result
*cContains keys 'actors', and 'action'. Needed to construct a string,
* stating who ($result['actors']), has already performed a reply
* ($result['action']), in the given Note (vars['note'])
*/
public function onAppendCardNote(array $vars, array &$result): EventResult
{
@@ -206,7 +211,7 @@ class Conversation extends Component
/**
* Posting event to add extra information to Component\Posting form data
*
* @param array $data Transport data to be filled with reply_to_id
* @param array{reply_to_id: int} $data Transport data to be filled with reply_to_id
*
* @throws \App\Util\Exception\ClientException
* @throws \App\Util\Exception\NoSuchNoteException
@@ -224,6 +229,8 @@ class Conversation extends Component
/**
* Add minimal Note card to RightPanel template
*
* @param string[] $elements
*/
public function onPrependPostingForm(Request $request, array &$elements): EventResult
{
@@ -250,8 +257,10 @@ class Conversation extends Component
/**
* Adds extra actions related to Conversation Component, that act upon/from the given Note.
*
* @param \App\Entity\Note $note Current Note being rendered
* @param array $actions Containing 'url' (Controller connected route), 'title' (used in anchor link containing the url), ?'classes' (CSS classes required for styling, if needed)
* @param \App\Entity\Note $note Current Note being rendered
* @param array{url: string, title: string, classes?: string} $actions Containing 'url' (Controller connected
* route), 'title' (used in anchor link containing the url), ?'classes' (CSS classes required for styling, if
* needed)
*
* @throws \App\Util\Exception\ServerException
*/