Actor   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 4
eloc 13
dl 0
loc 15
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 4
1
<?php
2
3
namespace musa11971\TVDB;
4
5
use Carbon\Carbon;
0 ignored issues
show
Bug introduced by
The type Carbon\Carbon was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
6
7
class Actor {
8
    public $id;
9
    public $name;
10
    public $role;
11
    public $image;
12
    public $imageURL;
13
    public $lastUpdated;
14
15
    public function __construct($data) {
16
        $this->id = $data->id;
17
        $this->name = $data->name;
18
        $this->role = (strlen($data->role)) ? $data->role : null;
19
        $this->image = (strlen($data->image)) ? $data->image : null;
20
        $this->imageURL = ($this->image !== null) ? TVDB::IMAGE_URL_PREFIX . $this->image : null;
21
        $this->lastUpdated = Carbon::parse($data->lastUpdated);
22
    }
23
}