strict to phpstan-level-4

This commit is contained in:
crazywhalecc
2022-04-03 01:47:38 +08:00
parent 0bab2e74b0
commit 3451434997
19 changed files with 67 additions and 59 deletions

View File

@@ -1,7 +1,6 @@
<?php
/**
* @noinspection PhpPropertyOnlyWrittenInspection
* @noinspection PhpUnusedParameterInspection
* @noinspection PhpComposerExtensionStubsInspection
*/
@@ -34,7 +33,12 @@ class OnManagerStart implements SwooleEvent
{
private static $last_hash = '';
private static $watch = -1;
private static $watch_tick_id = -1;
public static function getWatchTickId(): int
{
return self::$watch_tick_id;
}
public function onCall(Server $server)
{
@@ -65,7 +69,7 @@ class OnManagerStart implements SwooleEvent
}
}
if (Framework::$argv['polling-watch']) {
self::$watch = swoole_timer_tick(3000, function () use ($server) {
self::$watch_tick_id = swoole_timer_tick(3000, function () use ($server) {
$data = (DataProvider::scanDirFiles(DataProvider::getSourceRootDir() . '/src/'));
$hash = md5('');
foreach ($data as $file) {