fix code to phpstan-level-2

This commit is contained in:
crazywhalecc
2022-04-02 23:37:22 +08:00
committed by Jerry Ma
parent be9874a9ad
commit eecbe49955
31 changed files with 450 additions and 384 deletions

View File

@@ -51,8 +51,7 @@ class OnManagerStart implements SwooleEvent
if (Framework::$argv['watch']) {
if (extension_loaded('inotify')) {
Console::info('Enabled File watcher, framework will reload automatically.');
/* @noinspection PhpUndefinedFieldInspection */
Framework::$server->inotify = $fd = inotify_init();
$fd = inotify_init();
$this->addWatcher(DataProvider::getSourceRootDir() . '/src', $fd);
Event::add($fd, function () use ($fd) {
$r = inotify_read($fd);