User   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 1
Metric Value
eloc 4
c 2
b 0
f 1
dl 0
loc 8
ccs 3
cts 3
cp 1
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
1
<?php
2
3
namespace Igorsgm\Ghost\Models\Resources;
4
5
/**
6
 * Class User
7
 *
8
 * @property-read string $id
9
 * @property-read string $name
10
 * @property-read string $slug
11
 * @property-read string $email
12
 * @property-read string $profileImage
13
 * @property-read string $coverImage
14
 * @property-read string $bio
15
 * @property-read string $website
16
 * @property-read string $location
17
 * @property-read string $facebook
18
 * @property-read string $twitter
19
 * @property-read string $accessibility
20
 * @property-read string $tour
21
 * @property-read string $lastSeen
22
 * @property-read string $url
23
 * @property-read string $createdAt
24
 * @property-read string $updatedAt
25
 * @property-read \Illuminate\Support\Collection $roles
26
 * @property-read int $postsCount
27
 */
28
class User extends BaseResource
29
{
30
    protected string $resourceName = 'users';
31
32 34
    public function __construct(array $data = [])
33
    {
34 34
        parent::__construct($data);
35 34
        $this->postsCount = data_get($data, 'count.posts');
0 ignored issues
show
Bug introduced by
The property postsCount is declared read-only in Igorsgm\Ghost\Models\Resources\User.
Loading history...
36
    }
37
}
38