Code Duplication    Length = 14-14 lines in 2 locations

src/Arrayy.php 2 locations

@@ 5246-5259 (lines=14) @@
5243
     *
5244
     * @return bool
5245
     */
5246
    public function sizeIsGreaterThan(int $size): bool
5247
    {
5248
        // init
5249
        $itemsTempCount = 0;
5250
5251
        foreach ($this->getGenerator() as $key => $value) {
5252
            ++$itemsTempCount;
5253
            if ($itemsTempCount > $size) {
5254
                return true;
5255
            }
5256
        }
5257
5258
        return $itemsTempCount > $size;
5259
    }
5260
5261
    /**
5262
     * Checks whether array has less than $size items.
@@ 5268-5281 (lines=14) @@
5265
     *
5266
     * @return bool
5267
     */
5268
    public function sizeIsLessThan(int $size): bool
5269
    {
5270
        // init
5271
        $itemsTempCount = 0;
5272
5273
        foreach ($this->getGenerator() as $key => $value) {
5274
            ++$itemsTempCount;
5275
            if ($itemsTempCount > $size) {
5276
                return false;
5277
            }
5278
        }
5279
5280
        return $itemsTempCount < $size;
5281
    }
5282
5283
    /**
5284
     * Counts all elements in an array, or something in an object.