Code Duplication    Length = 10-12 lines in 2 locations

src/FlexiPeeHP/FlexiBee.php 2 locations

@@ 426-437 (lines=12) @@
423
     *
424
     * @return array výsledek
425
     */
426
    public function saveToFlexiBee($data = null)
427
    {
428
        if (is_null($data)) {
429
            $data = $this->getData();
430
        }
431
432
        $jsonizedData = $this->jsonizeData($data);
433
434
        curl_setopt($this->curl, CURLOPT_POSTFIELDS, $jsonizedData);
435
436
        return $this->performRequest($this->agenda.'.'.$this->format, 'PUT');
437
    }
438
439
    /**
440
     * Převede data do Json formátu pro FlexiBee.
@@ 465-474 (lines=10) @@
462
     *
463
     * @return array odpověď
464
     */
465
    public function insertToFlexiBee($data = null)
466
    {
467
        if (is_null($data)) {
468
            $data = $this->getData();
469
        }
470
        $jsonizedData = $this->jsonizeData($data);
471
        curl_setopt($this->curl, CURLOPT_POSTFIELDS, $jsonizedData);
472
473
        return $this->performRequest($this->agenda.'.'.$this->format, 'PUT');
474
    }
475
476
    /**
477
     * Test if given record ID exists in FlexiBee.