Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
31 | public function setModel($model) |
||
32 | 21 | { |
|
33 | if ($model == null) { |
||
34 | 21 | throw new JsonApiFakerException(Messages::ERROR_MODEL_NOT_NULL); |
|
35 | 2 | } |
|
36 | if (is_a($model, Model::class) === false) { |
||
37 | throw new JsonApiFakerException(Messages::ERROR_MODEL_NOT_OBJECT); |
||
38 | 19 | } |
|
39 | |||
40 | 19 | $this->model = $model; |
|
41 | |||
42 | return $this; |
||
43 | } |
||
70 |