Code Duplication    Length = 3-3 lines in 2 locations

Cmfcmf/OpenWeatherMap.php 2 locations

@@ 304-306 (lines=3) @@
301
     */
302
    public function getWeatherHistory($query, \DateTime $start, $endOrCount = 1, $type = 'hour', $units = 'imperial', $lang = 'en', $appid = '')
303
    {
304
        if (!in_array($type, array('tick', 'hour', 'day'))) {
305
            throw new \InvalidArgumentException('$type must be either "tick", "hour" or "day"');
306
        }
307
308
        $xml = json_decode($this->getRawWeatherHistory($query, $start, $endOrCount, $type, $units, $lang, $appid), true);
309
@@ 433-435 (lines=3) @@
430
     */
431
    public function getRawWeatherHistory($query, \DateTime $start, $endOrCount = 1, $type = 'hour', $units = 'imperial', $lang = 'en', $appid = '')
432
    {
433
        if (!in_array($type, array('tick', 'hour', 'day'))) {
434
            throw new \InvalidArgumentException('$type must be either "tick", "hour" or "day"');
435
        }
436
437
        $url = $this->buildUrl($query, $units, $lang, $appid, 'json', $this->weatherHistoryUrl);
438
        $url .= "&type=$type&start={$start->format('U')}";