1 | <?php |
||
22 | class Analytics implements ListenerInterfaceExpTimer, StatusAwarePluginInterface |
||
23 | { |
||
24 | /** @var Http */ |
||
25 | protected $http; |
||
26 | |||
27 | /** @var GameDataStorage */ |
||
28 | protected $gameData; |
||
29 | |||
30 | /** @var PlayerStorage */ |
||
31 | protected $playerStorage; |
||
32 | |||
33 | /** @var Countries */ |
||
34 | protected $countries; |
||
35 | |||
36 | /** @var LoggerInterface */ |
||
37 | protected $logger; |
||
38 | |||
39 | /** @var Version */ |
||
40 | protected $version; |
||
41 | |||
42 | /** @var string */ |
||
43 | protected $handshakeUrl; |
||
44 | |||
45 | /** @var string */ |
||
46 | protected $pingUrl; |
||
47 | |||
48 | /** @var int */ |
||
49 | protected $pingInterval; |
||
50 | |||
51 | /** @var int */ |
||
52 | protected $retryInterval; |
||
53 | |||
54 | /** @var bool Is a call in progress. */ |
||
55 | protected $operationInProgress = false; |
||
56 | |||
57 | /** @var string */ |
||
58 | protected $key = null; |
||
59 | |||
60 | /** @var int */ |
||
61 | protected $lastPing; |
||
62 | |||
63 | /** |
||
64 | * Analytics constructor. |
||
65 | * |
||
66 | * @param Http $http |
||
67 | * @param GameDataStorage $gameData |
||
68 | * @param PlayerStorage $playerStorage |
||
69 | * @param LoggerInterface $logger |
||
70 | * @param string $url |
||
|
|||
71 | * @param int $pingInterval |
||
72 | * @param int $retryInterval |
||
73 | */ |
||
74 | public function __construct( |
||
97 | |||
98 | |||
99 | /** |
||
100 | * Set the status of the plugin |
||
101 | * |
||
102 | * @param boolean $status |
||
103 | * |
||
104 | * @return null |
||
105 | */ |
||
106 | public function setStatus($status) |
||
112 | |||
113 | /** |
||
114 | * Handshake with analytics tool! |
||
115 | */ |
||
116 | protected function handshake() |
||
155 | |||
156 | /** |
||
157 | * Ping the analytics server with proper information. |
||
158 | */ |
||
159 | public function ping() |
||
198 | |||
199 | /** |
||
200 | * Get base data for pinging the server. |
||
201 | * |
||
202 | * @return array |
||
203 | */ |
||
204 | protected function getBasePingData() |
||
222 | |||
223 | /** |
||
224 | * @inheritdoc |
||
225 | */ |
||
226 | public function onPreLoop() |
||
230 | |||
231 | /** |
||
232 | * @inheritdoc |
||
233 | */ |
||
234 | public function onPostLoop() |
||
238 | |||
239 | /** |
||
240 | * @inheritdoc |
||
241 | */ |
||
242 | public function onEverySecond() |
||
246 | } |
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.