Simplify getNewOffset()
authorReedy <reedy@wikimedia.org>
Wed, 26 Sep 2012 15:59:58 +0000 (16:59 +0100)
committerReedy <reedy@wikimedia.org>
Wed, 26 Sep 2012 16:05:47 +0000 (17:05 +0100)
Remove @ingroup Diff comment which seems to have come from the extension

Change-Id: I2a357bde2b4298315ef05a619a05b56b0ce4dca2

includes/libs/GenericArrayObject.php

index b4b9d61..e72541c 100644 (file)
@@ -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;
        }
 
        /**