Skip to content

Commit

Permalink
Merge pull request #173 from leepeuker/HOTFIX
Browse files Browse the repository at this point in the history
Only require necessary data from trakt tv movies
  • Loading branch information
leepeuker authored Dec 21, 2022
2 parents 78eea53 + b3e09aa commit bcb6dfb
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 bcb6dfb

Please sign in to comment.