From ea73ea64ea194b84de3b111618dcfe8b3accf1d9 Mon Sep 17 00:00:00 2001 From: Reedy Date: Wed, 26 Sep 2012 16:59:58 +0100 Subject: [PATCH] Simplify getNewOffset() Remove @ingroup Diff comment which seems to have come from the extension Change-Id: I2a357bde2b4298315ef05a619a05b56b0ce4dca2 --- includes/libs/GenericArrayObject.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/includes/libs/GenericArrayObject.php b/includes/libs/GenericArrayObject.php index b4b9d6108a..e72541c0df 100644 --- a/includes/libs/GenericArrayObject.php +++ b/includes/libs/GenericArrayObject.php @@ -28,7 +28,6 @@ * @since 1.20 * * @file - * @ingroup Diff * * @licence GNU GPL v2+ * @author Jeroen De Dauw < jeroendedauw@gmail.com > @@ -61,13 +60,11 @@ abstract class GenericArrayObject extends ArrayObject { * @return integer */ protected function getNewOffset() { - while ( true ) { - if ( !$this->offsetExists( $this->indexOffset ) ) { - return $this->indexOffset; - } - + while ( $this->offsetExists( $this->indexOffset ) ) { $this->indexOffset++; } + + return $this->indexOffset; } /** -- 2.20.1