Code Duplication    Length = 17-19 lines in 2 locations

src/API.php 2 locations

@@ 277-293 (lines=17) @@
274
     * @param array $options
275
     * @return API\CreateItemResponseType
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
    {
@@ 632-650 (lines=19) @@
629
        return $response;
630
    }
631
632
    public function getServerTimezones($timezoneIDs = array(), $fullTimezoneData = false)
633
    {
634
        $request = GetServerTimeZonesType::buildFromArray(array(
635
            'returnFullTimeZoneData' => $fullTimezoneData
636
        ));
637
638
        if (!empty($timezoneIDs)) {
639
            $request->setIds($timezoneIDs);
640
        }
641
642
        $timezones = $this->getClient()->GetServerTimeZones($request);
643
        $timezones = $timezones->TimeZoneDefinition;
644
645
        if (!is_array($timezones)) {
646
            $timezones = array($timezones);
647
        }
648
649
        return $timezones;
650
    }
651
652
    /**
653
     * @param Type\ItemIdType $itemId