-
Notifications
You must be signed in to change notification settings - Fork 1
/
ide-helper.php
169 lines (148 loc) · 3.99 KB
/
ide-helper.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
<?php
namespace {
/**
* Log module call.
*
* @param string $module The name of the module
* @param string $action The name of the action being performed
* @param string|array $requestString The input parameters for the API call
* @param string|array $responseData The response data from the API call
* @param string|array $processedData The resulting data after any post processing (eg. json decode, xml decode, etc...)
* @param array $replaceVars An array of strings for replacement
*/
function logModuleCall(
string $module,
string $action,
string|array $requestString,
string|array $responseData,
string|array $processedData,
array $replaceVars
) {
}
/**
* Log activity.
*
* @param string $message The message to log
* @param int $clientId An optional client id to which the log entry relates
*/
function logActivity(string $message, int $clientId = 0)
{
}
/**
* Add a hook
*
* @param string $hookName
* @param int $priority
* @param callable $callable
*
* @return void
*/
function add_hook(string $hookName, int $priority, callable $callable)
{
}
function encrypt(string|null $text): string
{
return '';
}
function decrypt(string $text)
{
}
function run_hook(string $name, array $args, bool $what)
{
}
/**
* @mixin \Illuminate\Database\Eloquent\Builder
*/
class Eloquent extends \Illuminate\Database\Eloquent\Model
{
/**
* Find a model by its primary key or throw an exception.
*
* @param mixed $id
* @param array $columns
*
* @return \Illuminate\Database\Eloquent\Model|\Illuminate\Database\Eloquent\Collection|static|static[]
* @throws \Illuminate\Database\Eloquent\ModelNotFoundException
* @static
*/
public static function findOrFail($id, $columns = [])
{
/** @var \Illuminate\Database\Eloquent\Builder $instance */
return $instance->findOrFail($id, $columns);
}
/**
* Find a model by its primary key or return null
*
* @param mixed $id
* @param array $columns
*
* @return \Illuminate\Database\Eloquent\Model|\Illuminate\Database\Eloquent\Collection|static[]|static|null
* @throws \Illuminate\Database\Eloquent\ModelNotFoundException
* @static
*/
public static function find($id, $columns = [])
{
/** @var \Illuminate\Database\Eloquent\Builder $instance */
return $instance->find($id, $columns);
}
}
}
namespace WHMCS\Billing {
use Illuminate\Database\Eloquent\Model;
/**
* @mixin \Eloquent
*/
class Currency extends Model
{
}
}
namespace WHMCS\Database {
use Illuminate\Database\Capsule\Manager;
class Capsule extends Manager
{
}
}
namespace WHMCS\Service {
use Illuminate\Database\Eloquent\Model;
/**
* @see https://classdocs.whmcs.com/8.10/WHMCS/Service/Service.html
* Ideally we would have a way to generate this from that.
* For now, we just want this class to exist to satisfy Psalm/Stan and
* avoid false positive results there.
*
* @mixin \Eloquent
*
* @property string $domain
* @property string $domainstatus
*/
class Service extends Model
{
}
}
namespace WHMCS\User {
use Illuminate\Database\Eloquent\Model;
/**
* @mixin \Eloquent
*/
class Client extends Model
{
}
}
namespace WHMCS\Product {
use Illuminate\Database\Eloquent\Model;
/**
* @property string $servertype
* @mixin \Eloquent
*/
class Product extends Model
{
}
}
namespace WHMCS\Utility\Environment {
/**
* @method static string getBaseUrl()
*/
class WebHelper
{
}
}