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

Payment   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 6
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 6
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A fromArray() 0 4 1
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