Code Duplication    Length = 14-14 lines in 2 locations

src/Arrayy.php 2 locations

@@ 5420-5433 (lines=14) @@
5417
     *
5418
     * @return bool
5419
     */
5420
    public function sizeIsGreaterThan(int $size): bool
5421
    {
5422
        // init
5423
        $itemsTempCount = 0;
5424
5425
        foreach ($this->getGenerator() as $key => $value) {
5426
            ++$itemsTempCount;
5427
            if ($itemsTempCount > $size) {
5428
                return true;
5429
            }
5430
        }
5431
5432
        return $itemsTempCount > $size;
5433
    }
5434
5435
    /**
5436
     * Checks whether array has less than $size items.
@@ 5442-5455 (lines=14) @@
5439
     *
5440
     * @return bool
5441
     */
5442
    public function sizeIsLessThan(int $size): bool
5443
    {
5444
        // init
5445
        $itemsTempCount = 0;
5446
5447
        foreach ($this->getGenerator() as $key => $value) {
5448
            ++$itemsTempCount;
5449
            if ($itemsTempCount > $size) {
5450
                return false;
5451
            }
5452
        }
5453
5454
        return $itemsTempCount < $size;
5455
    }
5456
5457
    /**
5458
     * Counts all elements in an array, or something in an object.