Skip to content

Commit

Permalink
Only require necessary data from trakt tv movies
Browse files Browse the repository at this point in the history
  • Loading branch information
leepeuker committed Dec 21, 2022
1 parent 78eea53 commit b3e09aa
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions src/Api/Trakt/ValueObject/TraktMovie.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,22 @@

namespace Movary\Api\Trakt\ValueObject;

use Movary\ValueObject\Year;

class TraktMovie
{
private function __construct(
private readonly string $title,
private readonly Year $year,
private readonly TraktId $traktId,
private readonly string $imdbId,
private readonly int $tmdbId,
) {
}

public static function createFromArray(array $data) : self
{
return new self(
$data['title'],
Year::createFromInt($data['year']),
TraktId::createFromInt($data['ids']['trakt']),
$data['ids']['imdb'],
$data['ids']['tmdb'],
);
}

public function getImdbId() : string
{
return $this->imdbId;
}

public function getTitle() : string
{
return $this->title;
}

public function getTmdbId() : int
{
return $this->tmdbId;
Expand All @@ -45,9 +27,4 @@ public function getTraktId() : TraktId
{
return $this->traktId;
}

public function getYear() : Year
{
return $this->year;
}
}

0 comments on commit b3e09aa

Please sign in to comment.