The method getPaymentStatus() does not exist on Gewaer\Models\CompaniesSettings. Since you implemented __callStatic, consider adding a @method annotation.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
45
if (!CompaniesSettings::/** @scrutinizer ignore-call */ getPaymentStatus()) {
Loading history...
46
throw new ServerErrorHttpException('Subscription is not active.Please contact your admin');
47
}
48
49
switch (strtolower($request->getMethod())) {
50
case 'get':
51
$action = 'list';
52
if (preg_match("/\/([0-9]+)(?=[^\/]*$)/", $request->getURI())) {
53
$action = 'read';
54
}
55
break;
56
case 'post':
57
$action = 'create';
58
break;
59
case 'delete':
60
$action = 'delete';
61
break;
62
case 'put':
63
case 'patch':
64
$action = 'update';
65
break;
66
default:
67
throw new ServerErrorHttpException('No Permission define for this action');
68
break;
69
}
70
71
//do you have permision
72
if (!$userData->can($resource . '.' . $action)) {
73
throw new PermissionException('You dont have permission to run this action ' . $action . ' at ' . $resource);