Code Duplication    Length = 8-8 lines in 3 locations

src/Config.php 3 locations

@@ 161-168 (lines=8) @@
158
     *
159
     * @return int
160
     */
161
    public function rows($rows = null): int
162
    {
163
        if (isset($rows)) {
164
            $this->config[Options::ROWS] = (int) $rows;
165
        }
166
167
        return $this->config[Options::ROWS];
168
    }
169
170
    /**
171
     * Set a seed for the random number generator. Use this for reproducable of runs.
@@ 177-184 (lines=8) @@
174
     *
175
     * @return int
176
     */
177
    public function seed($seed = null): int
178
    {
179
        if (isset($seed)) {
180
            $this->config[Options::SEED] = (int) $seed;
181
        }
182
183
        return $this->config[Options::SEED];
184
    }
185
186
    /**
187
     * The number of states that each cell cycles through.
@@ 210-217 (lines=8) @@
207
     *
208
     * @return int
209
     */
210
    public function threshold($threshold = null): int
211
    {
212
        if (isset($threshold)) {
213
            $this->config[Options::THRESHOLD] = (int) $threshold;
214
        }
215
216
        return $this->config[Options::THRESHOLD];
217
    }
218
219
    public function toArray(): array
220
    {