Code Duplication    Length = 17-19 lines in 2 locations

src/API.php 2 locations

@@ 253-269 (lines=17) @@
250
     * @param array $options
251
     * @return API\CreateItemResponseType
252
     */
253
    public function createItems($items, $options = array())
254
    {
255
        if (!is_array($items)) {
256
            $items = array($items);
257
        }
258
259
        $request = array(
260
            'Items' => $items
261
        );
262
263
        $request = array_replace_recursive($request, $options);
264
        $request = Type::buildFromArray($request);
265
266
        $response = $this->getClient()->CreateItem($request);
267
268
        return $response;
269
    }
270
271
    public function updateItems($items, $options = array())
272
    {
@@ 549-567 (lines=19) @@
546
        return $response;
547
    }
548
549
    public function getServerTimezones($timezoneIDs = array(), $fullTimezoneData = false)
550
    {
551
        $request = GetServerTimeZonesType::buildFromArray(array(
552
            'returnFullTimeZoneData' => $fullTimezoneData
553
        ));
554
555
        if (!empty($timezoneIDs)) {
556
            $request->setIds($timezoneIDs);
557
        }
558
559
        $timezones = $this->getClient()->GetServerTimeZones($request);
560
        $timezones = $timezones->TimeZoneDefinition;
561
562
        if (!is_array($timezones)) {
563
            $timezones = array($timezones);
564
        }
565
566
        return $timezones;
567
    }
568
569
    /**
570
     * @param Type\ItemIdType $itemId