X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Flibs%2FExplodeIterator.php;h=d4abdc86e856d2f79fc097c6cfb51470480c3491;hb=a7253aba907dcbb4172cba574bc31bdaf356fa75;hp=64e33a471ceade173873a17baa14fe2c4bfe8e39;hpb=e4950e51f2ccf29a36e85bc51b1e04452c4f33dc;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/libs/ExplodeIterator.php b/includes/libs/ExplodeIterator.php index 64e33a471c..d4abdc86e8 100644 --- a/includes/libs/ExplodeIterator.php +++ b/includes/libs/ExplodeIterator.php @@ -40,7 +40,7 @@ class ExplodeIterator implements Iterator { // The position after the end of the next delimiter private $endPos; - // The current token + /** @var string|false The current token */ private $current; /** @@ -48,7 +48,7 @@ class ExplodeIterator implements Iterator { * @param string $delim * @param string $subject */ - function __construct( $delim, $subject ) { + public function __construct( $delim, $subject ) { $this->subject = $subject; $this->delim = $delim; @@ -59,13 +59,13 @@ class ExplodeIterator implements Iterator { $this->rewind(); } - function rewind() { + public function rewind() { $this->curPos = 0; $this->endPos = strpos( $this->subject, $this->delim ); $this->refreshCurrent(); } - function refreshCurrent() { + public function refreshCurrent() { if ( $this->curPos === false ) { $this->current = false; } elseif ( $this->curPos >= $this->subjectLength ) { @@ -77,21 +77,21 @@ class ExplodeIterator implements Iterator { } } - function current() { + public function current() { return $this->current; } /** * @return int|bool Current position or boolean false if invalid */ - function key() { + public function key() { return $this->curPos; } /** * @return string */ - function next() { + public function next() { if ( $this->endPos === false ) { $this->curPos = false; } else { @@ -110,7 +110,7 @@ class ExplodeIterator implements Iterator { /** * @return bool */ - function valid() { + public function valid() { return $this->curPos !== false; } }