Code Duplication    Length = 14-14 lines in 2 locations

src/Arrayy.php 2 locations

@@ 6005-6018 (lines=14) @@
6002
     *
6003
     * @return bool
6004
     */
6005
    public function sizeIsGreaterThan(int $size): bool
6006
    {
6007
        // init
6008
        $itemsTempCount = 0;
6009
6010
        foreach ($this->getGenerator() as $key => $value) {
6011
            ++$itemsTempCount;
6012
            if ($itemsTempCount > $size) {
6013
                return true;
6014
            }
6015
        }
6016
6017
        return $itemsTempCount > $size;
6018
    }
6019
6020
    /**
6021
     * Checks whether array has less than $size items.
@@ 6027-6040 (lines=14) @@
6024
     *
6025
     * @return bool
6026
     */
6027
    public function sizeIsLessThan(int $size): bool
6028
    {
6029
        // init
6030
        $itemsTempCount = 0;
6031
6032
        foreach ($this->getGenerator() as $key => $value) {
6033
            ++$itemsTempCount;
6034
            if ($itemsTempCount > $size) {
6035
                return false;
6036
            }
6037
        }
6038
6039
        return $itemsTempCount < $size;
6040
    }
6041
6042
    /**
6043
     * Counts all elements in an array, or something in an object.