Passed
Push — master ( f8b368...4df760 )
by Martin
05:42
created

Payment::fromArray()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Lendable\GoCardlessEnterpriseBundle\Entity;
4
5
class Payment extends \Lendable\GoCardlessEnterprise\Model\Payment
6
{
7
    public function fromArray($data)
8
    {
9
        parent::fromArray($data);
10
        $this->setCreatedAt(new \DateTime($this->getCreatedAt()));
0 ignored issues
show
Bug introduced by
new DateTime($this->getCreatedAt()) of type DateTime is incompatible with the type string expected by parameter $createdAt of Lendable\GoCardlessEnter...l\Model::setCreatedAt(). ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

10
        $this->setCreatedAt(/** @scrutinizer ignore-type */ new \DateTime($this->getCreatedAt()));
Loading history...
11
    }
12
}
13