Code Duplication    Length = 9-9 lines in 2 locations

Cmfcmf/OpenWeatherMap.php 2 locations

@@ 349-357 (lines=9) @@
346
     *
347
     * @api
348
     */
349
    public function getForecastUVIndex($lat, $lon, $cnt = 8)
350
    {
351
        $answer = $this->getRawUVIndexData('forecast', $lat, $lon, $cnt);
352
        $data = $this->parseJson($answer);
353
354
        return array_map(function ($entry) {
355
            return new UVIndex($entry);
356
        }, $data);
357
    }
358
359
    /**
360
     * Returns the historic uv index at the specified location.
@@ 374-382 (lines=9) @@
371
     *
372
     * @api
373
     */
374
    public function getHistoricUVIndex($lat, $lon, $start, $end)
375
    {
376
        $answer = $this->getRawUVIndexData('historic', $lat, $lon, null, $start, $end);
377
        $data = $this->parseJson($answer);
378
379
        return array_map(function ($entry) {
380
            return new UVIndex($entry);
381
        }, $data);
382
    }
383
384
    /**
385
     * Directly returns the xml/json/html string returned by OpenWeatherMap for the current weather.