jenkins-bot has submitted this change and it was merged. Change subject: Add some typehints & phpdoc ......................................................................
Add some typehints & phpdoc Change-Id: Ic5751f0745685ea4db009458b5976907dc22c518 --- M includes/DiscussionParser.php 1 file changed, 7 insertions(+), 7 deletions(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/DiscussionParser.php b/includes/DiscussionParser.php index 8394b24..6ff9583 100644 --- a/includes/DiscussionParser.php +++ b/includes/DiscussionParser.php @@ -626,7 +626,7 @@ * @param int $offset The line to find the full section for. * @return string Content of the section. */ - static function getFullSection( $lines, $offset ) { + static function getFullSection( array $lines, $offset ) { $start = self::getSectionStartIndex( $offset, $lines ); $end = self::getSectionEndIndex( $offset, $lines ); $content = implode( "\n", array_slice( $lines, $start, $end - $start ) ); @@ -650,11 +650,11 @@ /** * Finds the line number of the start of the section that $offset is in. - * @param $offset - * @param $lines + * @param int $offset + * @param array $lines * @return int */ - static function getSectionStartIndex( $offset, $lines ) { + static function getSectionStartIndex( $offset, array $lines ) { for ( $i = $offset - 1; $i >= 0; $i-- ) { if ( self::getSectionCount( $lines[$i] ) ) { break; @@ -666,11 +666,11 @@ /** * Finds the line number of the end of the section that $offset is in. - * @param $offset - * @param $lines + * @param int $offset + * @param array $lines * @return int */ - static function getSectionEndIndex( $offset, $lines ) { + static function getSectionEndIndex( $offset, array $lines ) { $lastLine = count( $lines ); for ( $i = $offset; $i < $lastLine; $i++ ) { if ( self::getSectionCount( $lines[$i] ) ) { -- To view, visit https://gerrit.wikimedia.org/r/314444 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic5751f0745685ea4db009458b5976907dc22c518 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: Addshore <addshorew...@gmail.com> Gerrit-Reviewer: Catrope <r...@wikimedia.org> Gerrit-Reviewer: Legoktm <legoktm.wikipe...@gmail.com> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits