Code Duplication    Length = 3-3 lines in 2 locations

Cmfcmf/OpenWeatherMap.php 2 locations

@@ 197-199 (lines=3) @@
194
     */
195
    public function getWeatherHistory($query, \DateTime $start, $endOrCount = 1, $type = 'hour', $units = 'imperial', $lang = 'en', $appid = '')
196
    {
197
        if (!in_array($type, array('tick', 'hour', 'day'))) {
198
            throw new \InvalidArgumentException('$type must be either "tick", "hour" or "day"');
199
        }
200
201
        $xml = json_decode($this->getRawWeatherHistory($query, $start, $endOrCount, $type, $units, $lang, $appid), true);
202
@@ 313-315 (lines=3) @@
310
     */
311
    public function getRawWeatherHistory($query, \DateTime $start, $endOrCount = 1, $type = 'hour', $units = 'imperial', $lang = 'en', $appid = '')
312
    {
313
        if (!in_array($type, array('tick', 'hour', 'day'))) {
314
            throw new \InvalidArgumentException('$type must be either "tick", "hour" or "day"');
315
        }
316
317
        $queryUrl = $this->weatherHistoryUrl . $this->buildQueryUrlParameter($query) . "&start={$start->format('U')}";
318