Completed
Pull Request — master (#9)
by Bernhard
02:13
created

Account   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
dl 0
loc 21
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A fromResponse() 0 8 1
1
<?php
2
3
namespace GloBee\PaymentApi\Models;
4
5
class Account extends Model
6
{
7
8
    protected $readonlyProperties = [
9
        'name' => null,
10
        'url' => null,
11
    ];
12
13
    /**
14
     * @param array $data
15
     *
16
     * @return Account
17
     */
18 2
    public static function fromResponse(array $data)
19
    {
20 2
        $self = new self();
21
22 2
        $self->properties['name'] = $data['name'];
23 2
        $self->properties['url'] = $data['url'];
24
25 2
        return $self;
26
    }
27
}
28