Code Duplication    Length = 13-14 lines in 2 locations

src/ZohoClient.php 2 locations

@@ 350-362 (lines=13) @@
347
     *
348
     * @throws ZohoCRMResponseException
349
     */
350
    public function updateRecords($module, $xmlData, $id = null, $wfTrigger = null, $version = 4, $newFormat = 2)
351
    {
352
        $params['newFormat'] = $newFormat;
353
        $params['version'] = $version;
354
        if ($wfTrigger) {
355
            $params['wfTrigger'] = 'true';
356
        }
357
        if ($id) {
358
            $params['id'] = $id;
359
        }
360
361
        return $this->call($module, 'updateRecords', $params, ['xmlData' => $xmlData->asXML()]);
362
    }
363
364
    /**
365
     * Implements updateRelatedRecords API method.
@@ 377-390 (lines=14) @@
374
     *
375
     * @throws ZohoCRMResponseException
376
     */
377
    public function updateRelatedRecords($module, $relatedModule, $xmlData, $id = null, $wfTrigger = null, $version = 4, $newFormat = 2)
378
    {
379
        $params['newFormat'] = $newFormat;
380
        $params['version'] = $version;
381
        $params['relatedModule'] = $relatedModule;
382
        if ($wfTrigger) {
383
            $params['wfTrigger'] = 'true';
384
        }
385
        if ($id) {
386
            $params['id'] = $id;
387
        }
388
389
        return $this->call($module, 'updateRelatedRecords', $params, ['xmlData' => $xmlData->asXML()]);
390
    }
391
392
    /**
393
     * Implements uploadFile API method.