User   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 10
dl 0
loc 20
rs 10
c 1
b 0
f 1
wmc 1

1 Method

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