| Conditions | 2 | 
| Paths | 4 | 
| Total Lines | 15 | 
| Code Lines | 9 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 9 | 
| CRAP Score | 2 | 
| Changes | 0 | ||
| 1 | <?php | ||
| 22 | 83 | public function __construct(Tmdb $tmdb, int $item_id, array $options, string $item_name) | |
| 23 |     { | ||
| 24 | try | ||
| 25 |         { | ||
| 26 | 83 | $this->id = (int) $item_id; | |
| 27 | 83 | $this->tmdb = $tmdb; | |
| 28 | 83 | $this->conf = $this->tmdb->getConfiguration(); | |
| 29 | 83 | $params = $this->tmdb->checkOptions($options); | |
| 30 | 83 | $this->data = $this->tmdb->sendRequest(new CurlRequest(), $item_name . '/' . (int) $item_id, null, $params); | |
| 31 | } | ||
| 32 | 3 | catch (\Exception $ex) | |
| 33 |         { | ||
| 34 | 3 | throw new \Exception($ex->getMessage(), $ex->getCode(), $ex); | |
| 35 | } | ||
| 36 | 80 | } | |
| 37 | |||
| 40 |