Addshore has uploaded a new change for review.
https://gerrit.wikimedia.org/r/314444
Change subject: Add some typehints & phpdoc
......................................................................
Add some typehints & phpdoc
Change-Id: Ic5751f0745685ea4db009458b5976907dc22c518
---
M includes/DiscussionParser.php
1 file changed, 7 insertions(+), 7 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo
refs/changes/44/314444/1
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: newchange
Gerrit-Change-Id: Ic5751f0745685ea4db009458b5976907dc22c518
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Addshore <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits