build: Updating composer dependencies

* mediawiki/mediawiki-phan-config: 0.10.6 → 0.11.0
* php-parallel-lint/php-parallel-lint: 1.3.0 → 1.3.1

Change-Id: I76996ed939d706739d2094077c64eeca6f51126a
This commit is contained in:
libraryupgrader 2021-09-08 18:31:24 +00:00 committed by Daimona Eaytoy
parent 93079c7eab
commit 26b69d2c70
6 changed files with 10 additions and 11 deletions

View file

@ -1,10 +1,10 @@
{
"require-dev": {
"mediawiki/mediawiki-codesniffer": "37.0.0",
"mediawiki/mediawiki-phan-config": "0.10.6",
"mediawiki/mediawiki-phan-config": "0.11.0",
"mediawiki/minus-x": "1.1.1",
"php-parallel-lint/php-console-highlighter": "0.5.0",
"php-parallel-lint/php-parallel-lint": "1.3.0"
"php-parallel-lint/php-parallel-lint": "1.3.1"
},
"scripts": {
"test": [

View file

@ -31,7 +31,6 @@ class ApiDiscussionTools extends ApiBase {
if ( !$title ) {
$this->dieWithError( [ 'apierror-invalidtitle', wfEscapeWikiText( $params['page'] ) ] );
return;
}
switch ( $params['paction'] ) {

View file

@ -35,7 +35,6 @@ class ApiDiscussionToolsEdit extends ApiBase {
if ( !$title ) {
$this->dieWithError( [ 'apierror-invalidtitle', wfEscapeWikiText( $params['page'] ) ] );
return;
}
$this->getErrorFormatter()->setContextTitle( $title );
@ -158,7 +157,6 @@ class ApiDiscussionToolsEdit extends ApiBase {
if ( !$comment || !( $comment instanceof CommentItem ) ) {
$this->dieWithError( [ 'apierror-discussiontools-commentid-notfound', $commentId ] );
return;
}
} else {
@ -167,10 +165,8 @@ class ApiDiscussionToolsEdit extends ApiBase {
if ( count( $comments ) > 1 ) {
$this->dieWithError( [ 'apierror-discussiontools-commentname-ambiguous', $commentName ] );
return;
} elseif ( !$comment || !( $comment instanceof CommentItem ) ) {
$this->dieWithError( [ 'apierror-discussiontools-commentname-notfound', $commentName ] );
return;
}
}

View file

@ -53,7 +53,6 @@ class ApiDiscussionToolsSubscribe extends ApiBase {
if ( !$title ) {
$this->dieWithError( [ 'apierror-invalidtitle', wfEscapeWikiText( $params['page'] ) ] );
return;
}
$commentName = $params['commentname'];
$subscribe = $params['subscribe'];

View file

@ -138,6 +138,7 @@ class CommentUtils {
$node->nodeType === XML_ELEMENT_NODE &&
in_array( strtolower( $node->nodeName ), $tagNames )
) {
// @phan-suppress-next-line PhanTypeMismatchReturn
return $node;
}
$node = $node->parentNode;

View file

@ -65,13 +65,17 @@ abstract class ThreadItem implements JsonSerializable {
$authors = [];
$getAuthorSet = static function ( ThreadItem $comment ) use ( &$authors, &$getAuthorSet ) {
if ( $comment instanceof CommentItem ) {
$authors[ $comment->getAuthor() ] = true;
$authors[ $comment->getAuthor() ] = true;
}
// Get the set of authors in the same format from each reply
array_map( $getAuthorSet, $comment->getReplies() );
foreach ( $comment->getReplies() as $reply ) {
$getAuthorSet( $reply );
}
};
array_map( $getAuthorSet, $this->getReplies() );
foreach ( $this->getReplies() as $reply ) {
$getAuthorSet( $reply );
}
ksort( $authors );
return array_keys( $authors );