Code Duplication    Length = 3-3 lines in 2 locations

Cmfcmf/OpenWeatherMap.php 2 locations

@@ 302-304 (lines=3) @@
299
     */
300
    public function getWeatherHistory($query, \DateTime $start, $endOrCount = 1, $type = 'hour', $units = 'imperial', $lang = 'en', $appid = '')
301
    {
302
        if (!in_array($type, array('tick', 'hour', 'day'))) {
303
            throw new \InvalidArgumentException('$type must be either "tick", "hour" or "day"');
304
        }
305
306
        $xml = json_decode($this->getRawWeatherHistory($query, $start, $endOrCount, $type, $units, $lang, $appid), true);
307
@@ 503-505 (lines=3) @@
500
     */
501
    public function getRawWeatherHistory($query, \DateTime $start, $endOrCount = 1, $type = 'hour', $units = 'imperial', $lang = 'en', $appid = '')
502
    {
503
        if (!in_array($type, array('tick', 'hour', 'day'))) {
504
            throw new \InvalidArgumentException('$type must be either "tick", "hour" or "day"');
505
        }
506
507
        $url = $this->buildUrl($query, $units, $lang, $appid, 'json', $this->weatherHistoryUrl);
508
        $url .= "&type=$type&start={$start->format('U')}";