| Conditions | 5 | 
| Paths | 3 | 
| Total Lines | 16 | 
| Code Lines | 7 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 8 | 
| CRAP Score | 5 | 
| Changes | 0 | ||
| 1 | <?php  | 
            ||
| 23 | 37 | public function __construct(Tmdb $tmdb, \stdClass $result)  | 
            |
| 24 |     { | 
            ||
| 25 | // Valid input object  | 
            ||
| 26 | 37 | $properties = get_object_vars($this);  | 
            |
| 27 | 37 | foreach (array_keys($properties) as $property)  | 
            |
| 28 |         { | 
            ||
| 29 | 37 | if ($property != 'conf' && $property != 'data' && !property_exists($result, $property))  | 
            |
| 30 |             { | 
            ||
| 31 | 37 |                 throw new \Exception('Incorrect input for ' . __CLASS__ . ' object. Property "' . $property . '" not found'); | 
            |
| 32 | }  | 
            ||
| 33 | }  | 
            ||
| 34 | |||
| 35 | // Configuration  | 
            ||
| 36 | 37 | $this->conf = $tmdb->getConfiguration();  | 
            |
| 37 | 37 | $this->data = $result;  | 
            |
| 38 | 37 | }  | 
            |
| 39 | |||
| 41 |