| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 2.003 |
| Changes | 0 | ||
| 1 | <?php |
||
| 27 | 3 | public function saveUsersAssociatedModels(string $model): void |
|
| 28 | { |
||
| 29 | 3 | $class = '\Gewaer\Models\UsersAssociated' . ucfirst($model); |
|
| 30 | 3 | $usersAssociatedModel = new $class(); |
|
| 31 | 3 | $usersAssociatedModel->users_id = $this->user->getId(); |
|
| 32 | 3 | $usersAssociatedModel->companies_id = $this->getId(); |
|
| 33 | 3 | $usersAssociatedModel->apps_id = $this->di->getApp()->getId(); |
|
| 34 | 3 | $usersAssociatedModel->identify_id = $this->user->getId(); |
|
| 35 | 3 | $usersAssociatedModel->user_active = 1; |
|
| 36 | 3 | $usersAssociatedModel->user_role = 'admin'; |
|
| 37 | |||
| 38 | 3 | if (!$usersAssociatedModel->save()) { |
|
| 39 | throw new Exception((string)current($usersAssociatedModel->getMessages())); |
||
| 40 | } |
||
| 43 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths