Completed
Push — master ( c0c41c...fc0657 )
by Freek
01:13
created

User   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 26
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 1
1
<?php
2
3
namespace OhDear\PhpSdk\Resources;
4
5
class User extends ApiResource
6
{
7
    /** @var int */
8
    public $id;
9
10
    /** @var string */
11
    public $name;
12
13
    /** @var string */
14
    public $email;
15
16
    /** @var email */
17
    public $photoUrl;
18
19
    /** @var Team[]  */
20
    public $teams;
21
22
    public function __construct(array $attributes, $ohDear = null)
23
    {
24
        parent::__construct($attributes, $ohDear);
25
26
        $this->teams = array_map(function (array $teamAttributes) {
27
            return new Team($teamAttributes);
28
        }, $this->teams);
29
    }
30
}
31