Code Duplication    Length = 3-3 lines in 2 locations

Cmfcmf/OpenWeatherMap.php 2 locations

@@ 324-326 (lines=3) @@
321
     */
322
    public function getWeatherHistory($query, \DateTime $start, $endOrCount = 1, $type = 'hour', $units = 'imperial', $lang = 'en', $appid = '')
323
    {
324
        if (!in_array($type, array('tick', 'hour', 'day'))) {
325
            throw new \InvalidArgumentException('$type must be either "tick", "hour" or "day"');
326
        }
327
328
        $xml = json_decode($this->getRawWeatherHistory($query, $start, $endOrCount, $type, $units, $lang, empty($appid) ? $this->apiKey : $appid), true);
329
@@ 537-539 (lines=3) @@
534
     */
535
    public function getRawWeatherHistory($query, \DateTime $start, $endOrCount = 1, $type = 'hour', $units = 'imperial', $lang = 'en', $appid = '')
536
    {
537
        if (!in_array($type, array('tick', 'hour', 'day'))) {
538
            throw new \InvalidArgumentException('$type must be either "tick", "hour" or "day"');
539
        }
540
541
        $queryUrl = $this->weatherHistoryUrl.$this->buildQueryUrlParameter($query)."&start={$start->format('U')}";
542