Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 0 |
1 | <?php |
||
35 | public static function create(Users $user, string $content, int $notificationTypeId, string $systemModule): void |
||
36 | { |
||
37 | $notification = new Notifications(); |
||
38 | $notification->users_id = $user->getId(); |
||
39 | $notification->companies_id = Di::getDefault()->getUserData()->currentCompanyId(); |
||
40 | $notification->apps_id = Di::getDefault()->getApp()->getId(); |
||
41 | $notification->notification_type_id = $notificationTypeId; |
||
42 | $notification->system_module_id = SystemModules::getSystemModuleByModelName($systemModule)->id; |
||
43 | $notification->entity_id = $user->getId(); |
||
44 | $notification->content = $content; |
||
45 | $notification->created_at = date('Y-m-d H:i:s'); |
||
46 | |||
47 | if (!$notification->save()){ |
||
48 | Di::getDefault()->getLog()->error((string)current($notification->getMessages())); |
||
49 | } |
||
51 | } |
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