Code Duplication    Length = 3-3 lines in 2 locations

Cmfcmf/OpenWeatherMap.php 2 locations

@@ 293-295 (lines=3) @@
290
     */
291
    public function getWeatherHistory($query, \DateTime $start, $endOrCount = 1, $type = 'hour', $units = 'imperial', $lang = 'en', $appid = '')
292
    {
293
        if (!in_array($type, array('tick', 'hour', 'day'))) {
294
            throw new \InvalidArgumentException('$type must be either "tick", "hour" or "day"');
295
        }
296
297
        $xml = json_decode($this->getRawWeatherHistory($query, $start, $endOrCount, $type, $units, $lang, $appid), true);
298
@@ 494-496 (lines=3) @@
491
     */
492
    public function getRawWeatherHistory($query, \DateTime $start, $endOrCount = 1, $type = 'hour', $units = 'imperial', $lang = 'en', $appid = '')
493
    {
494
        if (!in_array($type, array('tick', 'hour', 'day'))) {
495
            throw new \InvalidArgumentException('$type must be either "tick", "hour" or "day"');
496
        }
497
498
        $url = $this->buildUrl($query, $units, $lang, $appid, 'json', $this->weatherHistoryUrl);
499
        $url .= "&type=$type&start={$start->format('U')}";