| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | public function __construct($class, $id) |
||
| 11 | { |
||
| 12 | $reflection = new ReflectionClass($class); |
||
| 13 | |||
| 14 | $model = $reflection->getShortName(); |
||
| 15 | |||
| 16 | $message = sprintf( |
||
| 17 | 'Model `%s` not found by id `%s`. Try to set parent id in your model or use inner_hits statement.', |
||
| 18 | $model, $id |
||
| 19 | ); |
||
| 20 | |||
| 21 | parent::__construct($message); |
||
| 22 | } |
||
| 23 | } |