Code Duplication    Length = 7-7 lines in 2 locations

src/Combinatorics.php 1 location

@@ 54-60 (lines=7) @@
51
     *
52
     * @return $this
53
     */
54
    public function setLength($length = null)
55
    {
56
        $length = is_null($length) ? $this->datasetCount : $length;
57
        $this->length = ($length > $this->datasetCount) ? $this->datasetCount : $length;
58
59
        return $this;
60
    }
61
62
    /**
63
     * Get the length.

src/Iterators/Shift.php 1 location

@@ 43-49 (lines=7) @@
40
    /**
41
     * {@inheritdoc}
42
     */
43
    public function setLength($length = null)
44
    {
45
        $length = is_null($length) ? $this->datasetCount : $length;
46
        $this->length = (abs($length) > $this->datasetCount) ? $this->datasetCount : $length;
47
48
        return $this;
49
    }
50
51
    /**
52
     * {@inheritdoc}