This commit is contained in:
2020-12-17 14:09:14 +08:00
parent 672a719dbd
commit 36c1d0502a
151 changed files with 1937 additions and 2848 deletions
+5 -5
View File
@@ -23,7 +23,7 @@ use Swoole\Timer;
*/
class ServerInotify extends Process
{
private $inotify;
private mixed $inotify;
private bool $isReloading = false;
private bool $isReloadingOut = false;
private array $watchFiles = [];
@@ -80,10 +80,10 @@ class ServerInotify extends Process
/**
* @param $path
* @param bool $isReload
* @return void|mixed
* @return mixed
* @throws Exception
*/
private function loadByDir($path, $isReload = false)
private function loadByDir($path, $isReload = false): mixed
{
$path = rtrim($path, '/');
foreach (glob(realpath($path) . '/*') as $value) {
@@ -105,7 +105,7 @@ class ServerInotify extends Process
* @param $isReload
* @return bool
*/
private function checkFile($value, $isReload)
private function checkFile($value, $isReload): bool
{
$md5 = md5($value);
$mTime = filectime($value);
@@ -243,7 +243,7 @@ class ServerInotify extends Process
* @return bool
* @throws Exception
*/
public function watch($dir)
public function watch($dir): bool
{
//目录不存在
if (!is_dir($dir)) {