1 | <?php |
||
7 | class App |
||
8 | { |
||
9 | /** @var int */ |
||
10 | public $id; |
||
11 | |||
12 | /** @var string */ |
||
13 | public $key; |
||
14 | |||
15 | /** @var string */ |
||
16 | public $secret; |
||
17 | |||
18 | /** @var string|null */ |
||
19 | public $name; |
||
20 | |||
21 | /** @var string|null */ |
||
22 | public $host; |
||
23 | |||
24 | /** @var string|null */ |
||
25 | public $path; |
||
26 | |||
27 | /** @var int|null */ |
||
28 | public $capacity = null; |
||
29 | |||
30 | /** @var bool */ |
||
31 | public $clientMessagesEnabled = false; |
||
32 | |||
33 | /** @var bool */ |
||
34 | public $statisticsEnabled = true; |
||
35 | |||
36 | /** @var array */ |
||
37 | public $allowedOrigins = []; |
||
38 | |||
39 | /** |
||
40 | * Find the app by id. |
||
41 | * |
||
42 | * @param mixed $appId |
||
43 | * @return \BeyondCode\LaravelWebSockets\Apps\App|null |
||
44 | */ |
||
45 | public static function findById($appId) |
||
49 | |||
50 | /** |
||
51 | * Find the app by app key. |
||
52 | * |
||
53 | * @param mixed $appId |
||
|
|||
54 | * @return \BeyondCode\LaravelWebSockets\Apps\App|null |
||
55 | */ |
||
56 | public static function findByKey($appKey): ?self |
||
60 | |||
61 | /** |
||
62 | * Find the app by app secret. |
||
63 | * |
||
64 | * @param mixed $appId |
||
65 | * @return \BeyondCode\LaravelWebSockets\Apps\App|null |
||
66 | */ |
||
67 | public static function findBySecret($appSecret): ?self |
||
71 | |||
72 | /** |
||
73 | * Initialize the Web Socket app instance. |
||
74 | * |
||
75 | * @param mixed $appId |
||
76 | * @param mixed $key |
||
77 | * @param mixed $secret |
||
78 | * @return void |
||
79 | * @throws \BeyondCode\LaravelWebSockets\Exceptions\InvalidApp |
||
80 | */ |
||
81 | public function __construct($appId, $appKey, $appSecret) |
||
95 | |||
96 | /** |
||
97 | * Set the name of the app. |
||
98 | * |
||
99 | * @param string $appName |
||
100 | * @return $this |
||
101 | */ |
||
102 | public function setName(string $appName) |
||
108 | |||
109 | /** |
||
110 | * Set the app host. |
||
111 | * |
||
112 | * @param string $host |
||
113 | * @return $this |
||
114 | */ |
||
115 | public function setHost(string $host) |
||
121 | |||
122 | /** |
||
123 | * Set path for the app. |
||
124 | * |
||
125 | * @param string $path |
||
126 | * @return $this |
||
127 | */ |
||
128 | public function setPath(string $path) |
||
134 | |||
135 | /** |
||
136 | * Enable client messages. |
||
137 | * |
||
138 | * @param bool $enabled |
||
139 | * @return $this |
||
140 | */ |
||
141 | public function enableClientMessages(bool $enabled = true) |
||
147 | |||
148 | /** |
||
149 | * Set the maximum capacity for the app. |
||
150 | * |
||
151 | * @param int|null $capacity |
||
152 | * @return $this |
||
153 | */ |
||
154 | public function setCapacity(?int $capacity) |
||
160 | |||
161 | /** |
||
162 | * Enable statistics for the app. |
||
163 | * |
||
164 | * @param bool $enabled |
||
165 | * @return $this |
||
166 | */ |
||
167 | public function enableStatistics(bool $enabled = true) |
||
173 | |||
174 | /** |
||
175 | * Add whitelisted origins. |
||
176 | * |
||
177 | * @param array $allowedOrigins |
||
178 | * @return $this |
||
179 | */ |
||
180 | public function setAllowedOrigins(array $allowedOrigins) |
||
186 | } |
||
187 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.