Code Duplication    Length = 17-19 lines in 2 locations

src/API.php 2 locations

@@ 254-270 (lines=17) @@
251
     * @param array $options
252
     * @return API\CreateItemResponseType
253
     */
254
    public function createItems($items, $options = array())
255
    {
256
        if (!is_array($items)) {
257
            $items = array($items);
258
        }
259
260
        $request = array(
261
            'Items' => $items
262
        );
263
264
        $request = array_replace_recursive($request, $options);
265
        $request = Type::buildFromArray($request);
266
267
        $response = $this->getClient()->CreateItem($request);
268
269
        return $response;
270
    }
271
272
    public function updateItems($items, $options = array())
273
    {
@@ 564-582 (lines=19) @@
561
        return $response;
562
    }
563
564
    public function getServerTimezones($timezoneIDs = array(), $fullTimezoneData = false)
565
    {
566
        $request = GetServerTimeZonesType::buildFromArray(array(
567
            'returnFullTimeZoneData' => $fullTimezoneData
568
        ));
569
570
        if (!empty($timezoneIDs)) {
571
            $request->setIds($timezoneIDs);
572
        }
573
574
        $timezones = $this->getClient()->GetServerTimeZones($request);
575
        $timezones = $timezones->TimeZoneDefinition;
576
577
        if (!is_array($timezones)) {
578
            $timezones = array($timezones);
579
        }
580
581
        return $timezones;
582
    }
583
584
    /**
585
     * @param Type\ItemIdType $itemId