Issues (9)

src/Actor.php (1 issue)

Labels
Severity
1
<?php
2
3
namespace musa11971\TVDB;
4
5
use Carbon\Carbon;
0 ignored issues
show
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
}