Code Duplication    Length = 17-19 lines in 2 locations

src/API.php 2 locations

@@ 277-293 (lines=17) @@
274
     * @param array $options
275
     * @return Type
276
     */
277
    public function createItems($items, $options = array())
278
    {
279
        if (!is_array($items)) {
280
            $items = array($items);
281
        }
282
283
        $request = array(
284
            'Items' => $items
285
        );
286
287
        $request = array_replace_recursive($request, $options);
288
        $request = Type::buildFromArray($request);
289
290
        $response = $this->getClient()->CreateItem($request);
291
292
        return $response;
293
    }
294
295
    public function updateItems($items, $options = array())
296
    {
@@ 636-654 (lines=19) @@
633
        return $response;
634
    }
635
636
    public function getServerTimezones($timezoneIDs = array(), $fullTimezoneData = false)
637
    {
638
        $request = GetServerTimeZonesType::buildFromArray(array(
639
            'returnFullTimeZoneData' => $fullTimezoneData
640
        ));
641
642
        if (!empty($timezoneIDs)) {
643
            $request->setIds($timezoneIDs);
644
        }
645
646
        $timezones = $this->getClient()->GetServerTimeZones($request);
647
        $timezones = $timezones->TimeZoneDefinition;
648
649
        if (!is_array($timezones)) {
650
            $timezones = array($timezones);
651
        }
652
653
        return $timezones;
654
    }
655
656
    /**
657
     * @param Type\ItemIdType $itemId