Code Duplication    Length = 14-14 lines in 2 locations

src/Arrayy.php 2 locations

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