Skip to content

Commit

Permalink
Fix typehinting
Browse files Browse the repository at this point in the history
Property rating wasn't set to float.
Property ratingCount wasn't set to int in Serie.php
  • Loading branch information
RobinHoutevelts committed Dec 19, 2015
1 parent 2e6b98f commit 905354d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/Moinax/TvDb/Banner.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class Banner
public $language = '';

/**
* @var string
* @var float
*/
public $rating = '';

Expand Down Expand Up @@ -86,7 +86,7 @@ public function __construct($data)
$this->type2 = (string)$data->BannerType2;
$this->colors = (array)$data->Colors;
$this->language = (string)$data->Language;
$this->rating = (string)$data->Rating;
$this->rating = (float)$data->Rating;
$this->ratingCount = (int)$data->RatingCount;
$this->seriesName = (string)$data->SeriesName;
$this->thumbnailPath = (string)$data->ThumbnailPath;
Expand Down
4 changes: 2 additions & 2 deletions src/Moinax/TvDb/Episode.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class Episode
public $overview = '';

/**
* @var string
* @var float
*/
public $rating = '';

Expand Down Expand Up @@ -115,7 +115,7 @@ public function __construct($data)
$this->imdbId = (string)$data->IMDB_ID;
$this->language = (string) $data->Language;
$this->overview = (string)$data->Overview;
$this->rating = (string)$data->Rating;
$this->rating = (float)$data->Rating;
$this->ratingCount = (int)$data->RatingCount;
$this->lastUpdated = \DateTime::createFromFormat('U', (int)$data->lastupdated);
$this->writers = (array)Client::removeEmptyIndexes(explode('|', (string)$data->Writer));
Expand Down
6 changes: 3 additions & 3 deletions src/Moinax/TvDb/Serie.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class Serie
public $network = '';

/**
* @var string
* @var float
*/
public $rating = '';

Expand Down Expand Up @@ -155,8 +155,8 @@ public function __construct($data)
$this->contentRating = (string)$data->ContentRating;
$this->genres = (array)Client::removeEmptyIndexes(explode('|', (string)$data->Genre));
$this->network = (string)$data->Network;
$this->rating = (string)$data->Rating;
$this->ratingCount = (string)$data->RatingCount;
$this->rating = (float)$data->Rating;
$this->ratingCount = (int)$data->RatingCount;
$this->runtime = (int)$data->Runtime;
$this->status = (string)$data->Status;
$this->added = new \DateTime((string)$data->added);
Expand Down

0 comments on commit 905354d

Please sign in to comment.