Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
11 | 16 | public function setFilm( $film ) |
|
12 | { |
||
13 | 16 | if ($film instanceOf FilmProviderInterface): |
|
14 | 4 | $this->film = $film->getFilm(); |
|
15 | 13 | elseif ($film instanceOf FilmInterface): |
|
16 | 4 | $this->film = $film; |
|
17 | 1 | else: |
|
18 | 8 | throw new \InvalidArgumentException("Instance of FilmInterface or FilmProviderInterface expected."); |
|
19 | endif; |
||
20 | |||
21 | 8 | return $this; |
|
22 | } |
||
23 | } |
||
24 |