Code Duplication    Length = 8-9 lines in 3 locations

src/Resource/Customer.php 1 location

@@ 383-390 (lines=8) @@
380
     *
381
     * @return $this
382
     */
383
    public function setTaxDocument($number, $type = self::TAX_DOCUMENT)
384
    {
385
        $this->data->taxDocument = new stdClass();
386
        $this->data->taxDocument->type = $type;
387
        $this->data->taxDocument->number = $number;
388
389
        return $this;
390
    }
391
392
    /**
393
     * Set phone from customer.

src/Resource/Account.php 2 locations

@@ 377-384 (lines=8) @@
374
     *
375
     * @return \Moip\Resource\Account
376
     */
377
    public function setTaxDocument($number, $type = self::TAX_DOCUMENT)
378
    {
379
        $this->data->person->taxDocument = new stdClass();
380
        $this->data->person->taxDocument->type = $type;
381
        $this->data->person->taxDocument->number = $number;
382
383
        return $this;
384
    }
385
386
    /**
387
     * Set phone from account.
@@ 565-573 (lines=9) @@
562
     *
563
     * @return $this
564
     */
565
    public function setCompanyTaxDocument($documentNumber)
566
    {
567
        $this->initializeCompany();
568
        $this->data->company->taxDocument = new stdClass();
569
        $this->data->company->taxDocument->type = self::COMPANY_TAX_DOCUMENT;
570
        $this->data->company->taxDocument->number = $documentNumber;
571
572
        return $this;
573
    }
574
575
    /**
576
     * Set company tax document.