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
    {
@@ 615-633 (lines=19) @@
612
        return $response;
613
    }
614
615
    public function getServerTimezones($timezoneIDs = array(), $fullTimezoneData = false)
616
    {
617
        $request = GetServerTimeZonesType::buildFromArray(array(
618
            'returnFullTimeZoneData' => $fullTimezoneData
619
        ));
620
621
        if (!empty($timezoneIDs)) {
622
            $request->setIds($timezoneIDs);
623
        }
624
625
        $timezones = $this->getClient()->GetServerTimeZones($request);
626
        $timezones = $timezones->TimeZoneDefinition;
627
628
        if (!is_array($timezones)) {
629
            $timezones = array($timezones);
630
        }
631
632
        return $timezones;
633
    }
634
635
    /**
636
     * @param Type\ItemIdType $itemId