Skip to content

Commit

Permalink
Don't use native union type
Browse files Browse the repository at this point in the history
  • Loading branch information
neildaniels committed Feb 12, 2023
1 parent f4ca761 commit eb8dba8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/Tmdb/Repository/TvSeasonRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class TvSeasonRepository extends AbstractRepository
* @return null|AbstractModel
* @throws RuntimeException
*/
public function load(int|Tv $tvShow, int|Season $season, array $parameters = [], array $headers = [])
public function load($tvShow, $season, array $parameters = [], array $headers = [])
{
if ($tvShow instanceof Tv) {
$tvShow = $tvShow->getId();
Expand Down
5 changes: 2 additions & 3 deletions test/Tmdb/Tests/Repository/TvSeasonRepositoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

use Tmdb\Exception\RuntimeException;
use Tmdb\Model\Tv;
use TypeError;

class TvSeasonRepositoryTest extends TestCase
{
Expand Down Expand Up @@ -126,7 +125,7 @@ public function shouldGetVideos()
*/
public function shouldThrowExceptionWhenConditionsNotMet()
{
$this->expectException(TypeError::class);
$this->expectException(RuntimeException::class);
$repository = $this->getRepositoryWithMockedHttpClient();

$tv = new Tv();
Expand All @@ -140,7 +139,7 @@ public function shouldThrowExceptionWhenConditionsNotMet()
*/
public function shouldThrowExceptionWhenConditionsNotMetAll()
{
$this->expectException(TypeError::class);
$this->expectException(RuntimeException::class);
$repository = $this->getRepositoryWithMockedHttpClient();
$repository->load(null, null);
}
Expand Down

0 comments on commit eb8dba8

Please sign in to comment.