Code Duplication    Length = 8-8 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

@@ 378-385 (lines=8) @@
375
     *
376
     * @return \Moip\Resource\Account
377
     */
378
    public function setTaxDocument($number, $type = self::TAX_DOCUMENT)
379
    {
380
        $this->data->person->taxDocument = new stdClass();
381
        $this->data->person->taxDocument->type = $type;
382
        $this->data->person->taxDocument->number = $number;
383
384
        return $this;
385
    }
386
387
    /**
388
     * Set phone from account.
@@ 554-561 (lines=8) @@
551
     *
552
     * @return $this
553
     */
554
    public function setCompanyTaxDocument($documentNumber)
555
    {
556
        $this->data->company->taxDocument = new stdClass();
557
        $this->data->company->taxDocument->type = self::COMPANY_TAX_DOCUMENT;
558
        $this->data->company->taxDocument->number = $documentNumber;
559
560
        return $this;
561
    }
562
563
    /**
564
     * Set company tax document.