Code Duplication    Length = 14-14 lines in 2 locations

src/Arrayy.php 2 locations

@@ 5200-5213 (lines=14) @@
5197
     *
5198
     * @return bool
5199
     */
5200
    public function sizeIsGreaterThan(int $size): bool
5201
    {
5202
        // init
5203
        $itemsTempCount = 0;
5204
5205
        foreach ($this->getGenerator() as $key => $value) {
5206
            ++$itemsTempCount;
5207
            if ($itemsTempCount > $size) {
5208
                return true;
5209
            }
5210
        }
5211
5212
        return $itemsTempCount > $size;
5213
    }
5214
5215
    /**
5216
     * Checks whether array has less than $size items.
@@ 5222-5235 (lines=14) @@
5219
     *
5220
     * @return bool
5221
     */
5222
    public function sizeIsLessThan(int $size): bool
5223
    {
5224
        // init
5225
        $itemsTempCount = 0;
5226
5227
        foreach ($this->getGenerator() as $key => $value) {
5228
            ++$itemsTempCount;
5229
            if ($itemsTempCount > $size) {
5230
                return false;
5231
            }
5232
        }
5233
5234
        return $itemsTempCount < $size;
5235
    }
5236
5237
    /**
5238
     * Counts all elements in an array, or something in an object.