Code Duplication    Length = 3-3 lines in 2 locations

Cmfcmf/OpenWeatherMap.php 2 locations

@@ 235-237 (lines=3) @@
232
     */
233
    public function getWeatherHistory($query, \DateTime $start, $endOrCount = 1, $type = 'hour', $units = 'imperial', $lang = 'en', $appid = '')
234
    {
235
        if (!in_array($type, array('tick', 'hour', 'day'))) {
236
            throw new \InvalidArgumentException('$type must be either "tick", "hour" or "day"');
237
        }
238
239
        $xml = json_decode($this->getRawWeatherHistory($query, $start, $endOrCount, $type, $units, $lang, $appid), true);
240
@@ 344-346 (lines=3) @@
341
     */
342
    public function getRawWeatherHistory($query, \DateTime $start, $endOrCount = 1, $type = 'hour', $units = 'imperial', $lang = 'en', $appid = '')
343
    {
344
        if (!in_array($type, array('tick', 'hour', 'day'))) {
345
            throw new \InvalidArgumentException('$type must be either "tick", "hour" or "day"');
346
        }
347
348
        $url = $this->buildUrl($query, $units, $lang, $appid, 'json', $this->weatherHistoryUrl);
349
        $url .= "&type=$type&start={$start->format('U')}";