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