Code Duplication    Length = 10-10 lines in 2 locations

src/Resource/Customer.php 1 location

@@ 364-373 (lines=10) @@
361
     *
362
     * @return $this
363
     */
364
    public function setBirthDate($birthDate)
365
    {
366
        if ($birthDate instanceof \DateTime) {
367
            $birthDate = $birthDate->format('Y-m-d');
368
        }
369
370
        $this->data->birthDate = $birthDate;
371
372
        return $this;
373
    }
374
375
    /**
376
     * Set tax document from customer.

src/Resource/Account.php 1 location

@@ 381-390 (lines=10) @@
378
     *
379
     * @return \Moip\Resource\Account
380
     */
381
    public function setBirthDate($birthDate)
382
    {
383
        if ($birthDate instanceof \DateTime) {
384
            $birthDate = $birthDate->format('Y-m-d');
385
        }
386
387
        $this->data->person->birthDate = $birthDate;
388
389
        return $this;
390
    }
391
392
    /**
393
     * Set tax document from account.