diff --git a/library/think/Build.php b/library/think/Build.php index 2ddfa642..7b26a103 100644 --- a/library/think/Build.php +++ b/library/think/Build.php @@ -8,6 +8,7 @@ // +---------------------------------------------------------------------- // | Author: liu21st // +---------------------------------------------------------------------- + namespace think; class Build diff --git a/library/think/Collection.php b/library/think/Collection.php index 4c691a94..537be258 100644 --- a/library/think/Collection.php +++ b/library/think/Collection.php @@ -11,7 +11,6 @@ namespace think; - use ArrayAccess; use ArrayIterator; use Countable; diff --git a/library/think/File.php b/library/think/File.php index 639bbe1c..6994d534 100644 --- a/library/think/File.php +++ b/library/think/File.php @@ -29,7 +29,6 @@ class File extends SplFileObject */ protected function checkPath($path) { - if (is_dir($path)) { return true; } @@ -37,7 +36,7 @@ class File extends SplFileObject if (mkdir($path, 0777, true)) { return true; } else { - $this->error = "目录 {$savepath} 创建失败!"; + $this->error = "目录 {$path} 创建失败!"; return false; } } diff --git a/library/think/Log.php b/library/think/Log.php index 55290d30..7b41c6ee 100644 --- a/library/think/Log.php +++ b/library/think/Log.php @@ -29,7 +29,10 @@ class Log // 通知发送驱动 protected static $alarm = null; - // 日志初始化 + /** + * 日志初始化 + * @return void + */ public static function init($config = []) { $type = isset($config['type']) ? $config['type'] : 'File'; @@ -40,7 +43,10 @@ class Log APP_DEBUG && Log::record('[ LOG ] INIT ' . $type . ': ' . var_export($config, true), 'info'); } - // 通知初始化 + /** + * 通知初始化 + * @return void + */ public static function alarm($config = []) { $type = isset($config['type']) ? $config['type'] : 'Email'; @@ -128,7 +134,10 @@ class Log self::$alarm && self::$alarm->send($msg); } - // 静态调用 + /** + * 静态调用 + * @return void + */ public static function __callStatic($method, $args) { if (in_array($method, self::$type)) { diff --git a/library/think/Paginator.php b/library/think/Paginator.php index 3688e045..7f046591 100644 --- a/library/think/Paginator.php +++ b/library/think/Paginator.php @@ -11,7 +11,6 @@ namespace think; - use think\paginator\Collection as PaginatorCollection; abstract class Paginator diff --git a/library/think/Process.php b/library/think/Process.php index 919cf4f2..1982de24 100644 --- a/library/think/Process.php +++ b/library/think/Process.php @@ -11,7 +11,6 @@ namespace think; - use think\process\exception\Failed as ProcessFailedException; use think\process\exception\Timeout as ProcessTimeoutException; use think\process\pipes\Pipes; diff --git a/library/think/Session.php b/library/think/Session.php index cfb0e59b..1889cef5 100644 --- a/library/think/Session.php +++ b/library/think/Session.php @@ -8,6 +8,7 @@ // +---------------------------------------------------------------------- // | Author: liu21st // +---------------------------------------------------------------------- + namespace think; class Session diff --git a/library/think/console/helper/Debug.php b/library/think/console/helper/Debug.php index 9e244657..163b86d5 100644 --- a/library/think/console/helper/Debug.php +++ b/library/think/console/helper/Debug.php @@ -11,7 +11,6 @@ namespace think\console\helper; - class Debug extends Helper { diff --git a/library/think/console/helper/Process.php b/library/think/console/helper/Process.php index 67f66307..5aaeeff4 100644 --- a/library/think/console/helper/Process.php +++ b/library/think/console/helper/Process.php @@ -11,7 +11,6 @@ namespace think\console\helper; - use think\console\Output; use think\process\Builder as ProcessBuilder; use think\process as ThinkProcess; diff --git a/library/think/console/helper/Question.php b/library/think/console/helper/Question.php index 107ad607..78416fbd 100644 --- a/library/think/console/helper/Question.php +++ b/library/think/console/helper/Question.php @@ -11,7 +11,6 @@ namespace think\console\helper; - use think\console\Input; use think\console\Output; use think\console\helper\question\Question as OutputQuestion; diff --git a/library/think/console/helper/Set.php b/library/think/console/helper/Set.php index 644649c8..63ea58e4 100644 --- a/library/think/console/helper/Set.php +++ b/library/think/console/helper/Set.php @@ -11,7 +11,6 @@ namespace think\console\helper; - use think\console\command\Command; class Set implements \IteratorAggregate diff --git a/library/think/console/input/Argument.php b/library/think/console/input/Argument.php index aa8c6768..843f928c 100644 --- a/library/think/console/input/Argument.php +++ b/library/think/console/input/Argument.php @@ -11,7 +11,6 @@ namespace think\console\input; - class Argument { diff --git a/library/think/console/input/Definition.php b/library/think/console/input/Definition.php index f04ea157..4df9389a 100644 --- a/library/think/console/input/Definition.php +++ b/library/think/console/input/Definition.php @@ -11,7 +11,6 @@ namespace think\console\input; - class Definition { diff --git a/library/think/console/output/Nothing.php b/library/think/console/output/Nothing.php index 93ca6fe8..c1550270 100644 --- a/library/think/console/output/Nothing.php +++ b/library/think/console/output/Nothing.php @@ -11,7 +11,6 @@ namespace think\console\output; - use think\console\Output; class Nothing extends Output diff --git a/library/think/console/output/Stream.php b/library/think/console/output/Stream.php index f66f0775..b97b582e 100644 --- a/library/think/console/output/Stream.php +++ b/library/think/console/output/Stream.php @@ -11,7 +11,6 @@ namespace think\console\output; - class Stream { diff --git a/library/think/console/output/formatter/Stack.php b/library/think/console/output/formatter/Stack.php index 8e85e4f1..0335d6c0 100644 --- a/library/think/console/output/formatter/Stack.php +++ b/library/think/console/output/formatter/Stack.php @@ -11,7 +11,6 @@ namespace think\console\output\formatter; - class Stack { diff --git a/library/think/controller/Hprose.php b/library/think/controller/Hprose.php index cf0711e7..d6ab39d2 100644 --- a/library/think/controller/Hprose.php +++ b/library/think/controller/Hprose.php @@ -8,6 +8,7 @@ // +---------------------------------------------------------------------- // | Author: liu21st // +---------------------------------------------------------------------- + namespace think\controller; /** diff --git a/library/think/controller/Jsonrpc.php b/library/think/controller/Jsonrpc.php index e93d80a1..0e000d49 100644 --- a/library/think/controller/Jsonrpc.php +++ b/library/think/controller/Jsonrpc.php @@ -8,6 +8,7 @@ // +---------------------------------------------------------------------- // | Author: liu21st // +---------------------------------------------------------------------- + namespace think\controller; /** diff --git a/library/think/controller/Rpc.php b/library/think/controller/Rpc.php index 7e2fe0bd..2a014c16 100644 --- a/library/think/controller/Rpc.php +++ b/library/think/controller/Rpc.php @@ -8,6 +8,7 @@ // +---------------------------------------------------------------------- // | Author: liu21st // +---------------------------------------------------------------------- + namespace think\controller; /** diff --git a/library/think/controller/Yar.php b/library/think/controller/Yar.php index 05627c75..0a876326 100644 --- a/library/think/controller/Yar.php +++ b/library/think/controller/Yar.php @@ -8,6 +8,7 @@ // +---------------------------------------------------------------------- // | Author: liu21st // +---------------------------------------------------------------------- + namespace think\controller; /** diff --git a/library/think/log/alarm/Email.php b/library/think/log/alarm/Email.php index 531666c4..0a1ac7dd 100644 --- a/library/think/log/alarm/Email.php +++ b/library/think/log/alarm/Email.php @@ -8,6 +8,7 @@ // +---------------------------------------------------------------------- // | Author: liu21st // +---------------------------------------------------------------------- + namespace think\log\alarm; /** diff --git a/library/think/log/driver/File.php b/library/think/log/driver/File.php index b3fa9c42..0f781866 100644 --- a/library/think/log/driver/File.php +++ b/library/think/log/driver/File.php @@ -8,6 +8,7 @@ // +---------------------------------------------------------------------- // | Author: liu21st // +---------------------------------------------------------------------- + namespace think\log\driver; /** diff --git a/library/think/log/driver/Sae.php b/library/think/log/driver/Sae.php index 7f3c3349..d01bdabc 100644 --- a/library/think/log/driver/Sae.php +++ b/library/think/log/driver/Sae.php @@ -1,13 +1,5 @@ -// +---------------------------------------------------------------------- + namespace think\log\driver; /** diff --git a/library/think/log/driver/Socket.php b/library/think/log/driver/Socket.php index 6a5e87f7..88c34033 100644 --- a/library/think/log/driver/Socket.php +++ b/library/think/log/driver/Socket.php @@ -1,10 +1,20 @@ +// +---------------------------------------------------------------------- + +namespace think\log\driver; + /** * github: https://github.com/luofei614/SocketLog * @author luofei614 */ -namespace think\log\driver; - class Socket { public $port = 1116; //SocketLog 服务的http的端口号 diff --git a/library/think/log/driver/Test.php b/library/think/log/driver/Test.php index e367ca3c..7f663384 100644 --- a/library/think/log/driver/Test.php +++ b/library/think/log/driver/Test.php @@ -8,6 +8,7 @@ // +---------------------------------------------------------------------- // | Author: liu21st // +---------------------------------------------------------------------- + namespace think\log\driver; /** diff --git a/library/think/log/driver/Trace.php b/library/think/log/driver/Trace.php index d40f1071..e4565c83 100644 --- a/library/think/log/driver/Trace.php +++ b/library/think/log/driver/Trace.php @@ -8,6 +8,7 @@ // +---------------------------------------------------------------------- // | Author: liu21st // +---------------------------------------------------------------------- + namespace think\log\driver; use think\Config; diff --git a/library/think/process/Utils.php b/library/think/process/Utils.php index 28506e87..3ed136a5 100644 --- a/library/think/process/Utils.php +++ b/library/think/process/Utils.php @@ -9,7 +9,6 @@ namespace think\process; - class Utils { diff --git a/library/think/process/exception/Timeout.php b/library/think/process/exception/Timeout.php index 62933e24..c085ee8e 100644 --- a/library/think/process/exception/Timeout.php +++ b/library/think/process/exception/Timeout.php @@ -11,7 +11,6 @@ namespace think\process\exception; - use think\Process; class Timeout extends \RuntimeException diff --git a/library/think/process/pipes/Unix.php b/library/think/process/pipes/Unix.php index 328b19f5..abfe61b2 100644 --- a/library/think/process/pipes/Unix.php +++ b/library/think/process/pipes/Unix.php @@ -11,7 +11,6 @@ namespace think\process\pipes; - use think\Process; class Unix extends Pipes diff --git a/library/think/process/pipes/Windows.php b/library/think/process/pipes/Windows.php index 31579eab..2cc44ca7 100644 --- a/library/think/process/pipes/Windows.php +++ b/library/think/process/pipes/Windows.php @@ -11,7 +11,6 @@ namespace think\process\pipes; - use think\Process; class Windows extends Pipes diff --git a/library/think/view/driver/Php.php b/library/think/view/driver/Php.php index fab8d688..0b6edbac 100644 --- a/library/think/view/driver/Php.php +++ b/library/think/view/driver/Php.php @@ -8,6 +8,7 @@ // +---------------------------------------------------------------------- // | Author: liu21st // +---------------------------------------------------------------------- + namespace think\view\driver; use think\Exception; diff --git a/library/think/view/driver/Think.php b/library/think/view/driver/Think.php index 802eba61..6867b855 100644 --- a/library/think/view/driver/Think.php +++ b/library/think/view/driver/Think.php @@ -8,6 +8,7 @@ // +---------------------------------------------------------------------- // | Author: liu21st // +---------------------------------------------------------------------- + namespace think\view\driver; use think\Exception; diff --git a/mode/console/App.php b/mode/console/App.php index d3672af4..fd19be16 100644 --- a/mode/console/App.php +++ b/mode/console/App.php @@ -11,7 +11,6 @@ namespace think; - use think\Console; class App diff --git a/mode/console/Error.php b/mode/console/Error.php index 6f84280c..a0537e10 100644 --- a/mode/console/Error.php +++ b/mode/console/Error.php @@ -8,6 +8,7 @@ // +---------------------------------------------------------------------- // | Author: yunwuxin <448901948@qq.com> // +---------------------------------------------------------------------- + namespace think; class Error