refactor change self:: to static::

This commit is contained in:
小喵 2023-08-27 15:27:42 +08:00
parent cc92d67c05
commit 0393ab8b89
Signed by: mt
GPG key ID: CD321C269EC63BB6
4 changed files with 36 additions and 20 deletions

View file

@ -29,7 +29,7 @@ abstract class FileViewer
$directory = static::directory();
$filename = "$directory/$file";
if (!in_array($file, self::list()) || !file_exists($filename) || !is_file($filename)) return null;
if (!in_array($file, static::list()) || !file_exists($filename) || !is_file($filename)) return null;
$extension = pathinfo($filename, PATHINFO_EXTENSION);
$content = file_get_contents($filename);