Code Duplication    Length = 14-14 lines in 2 locations

src/Arrayy.php 2 locations

@@ 5236-5249 (lines=14) @@
5233
     *
5234
     * @return bool
5235
     */
5236
    public function sizeIsGreaterThan(int $size): bool
5237
    {
5238
        // init
5239
        $itemsTempCount = 0;
5240
5241
        foreach ($this->getGenerator() as $key => $value) {
5242
            ++$itemsTempCount;
5243
            if ($itemsTempCount > $size) {
5244
                return true;
5245
            }
5246
        }
5247
5248
        return $itemsTempCount > $size;
5249
    }
5250
5251
    /**
5252
     * Checks whether array has less than $size items.
@@ 5258-5271 (lines=14) @@
5255
     *
5256
     * @return bool
5257
     */
5258
    public function sizeIsLessThan(int $size): bool
5259
    {
5260
        // init
5261
        $itemsTempCount = 0;
5262
5263
        foreach ($this->getGenerator() as $key => $value) {
5264
            ++$itemsTempCount;
5265
            if ($itemsTempCount > $size) {
5266
                return false;
5267
            }
5268
        }
5269
5270
        return $itemsTempCount < $size;
5271
    }
5272
5273
    /**
5274
     * Counts all elements in an array, or something in an object.