Code Duplication    Length = 10-10 lines in 3 locations

src/PhpSpreadsheet/Chart/DataSeries.php 3 locations

@@ 263-272 (lines=10) @@
260
     *
261
     * @return DataSeriesValues
262
     */
263
    public function getPlotLabelByIndex($index)
264
    {
265
        $keys = array_keys($this->plotLabel);
266
        if (in_array($index, $keys)) {
267
            return $this->plotLabel[$index];
268
        } elseif (isset($keys[$index])) {
269
            return $this->plotLabel[$keys[$index]];
270
        }
271
272
        return false;
273
    }
274
275
    /**
@@ 292-301 (lines=10) @@
289
     *
290
     * @return DataSeriesValues
291
     */
292
    public function getPlotCategoryByIndex($index)
293
    {
294
        $keys = array_keys($this->plotCategory);
295
        if (in_array($index, $keys)) {
296
            return $this->plotCategory[$index];
297
        } elseif (isset($keys[$index])) {
298
            return $this->plotCategory[$keys[$index]];
299
        }
300
301
        return false;
302
    }
303
304
    /**
@@ 345-354 (lines=10) @@
342
     *
343
     * @return DataSeriesValues
344
     */
345
    public function getPlotValuesByIndex($index)
346
    {
347
        $keys = array_keys($this->plotValues);
348
        if (in_array($index, $keys)) {
349
            return $this->plotValues[$index];
350
        } elseif (isset($keys[$index])) {
351
            return $this->plotValues[$keys[$index]];
352
        }
353
354
        return false;
355
    }
356
357
    /**