Code Duplication    Length = 14-14 lines in 2 locations

src/Arrayy.php 2 locations

@@ 5405-5418 (lines=14) @@
5402
     *
5403
     * @return bool
5404
     */
5405
    public function sizeIsGreaterThan(int $size): bool
5406
    {
5407
        // init
5408
        $itemsTempCount = 0;
5409
5410
        foreach ($this->getGenerator() as $key => $value) {
5411
            ++$itemsTempCount;
5412
            if ($itemsTempCount > $size) {
5413
                return true;
5414
            }
5415
        }
5416
5417
        return $itemsTempCount > $size;
5418
    }
5419
5420
    /**
5421
     * Checks whether array has less than $size items.
@@ 5427-5440 (lines=14) @@
5424
     *
5425
     * @return bool
5426
     */
5427
    public function sizeIsLessThan(int $size): bool
5428
    {
5429
        // init
5430
        $itemsTempCount = 0;
5431
5432
        foreach ($this->getGenerator() as $key => $value) {
5433
            ++$itemsTempCount;
5434
            if ($itemsTempCount > $size) {
5435
                return false;
5436
            }
5437
        }
5438
5439
        return $itemsTempCount < $size;
5440
    }
5441
5442
    /**
5443
     * Counts all elements in an array, or something in an object.