diff --git a/src/Command/JWTCommand.php b/src/Command/JWTCommand.php index d005404c3da0e8dab1e53b4a5c1ec4d7e025381d..52a04a5f372b438e87a949cc0912604c0b608d6f 100644 --- a/src/Command/JWTCommand.php +++ b/src/Command/JWTCommand.php @@ -1,5 +1,19 @@ littlezov@qq.com + * @link https://github.com/littlezo + * @document https://github.com/littlezo/wiki + * @license https://github.com/littlezo/MozillaPublicLicense/blob/main/LICENSE + * + */ + namespace Xmo\JWTAuth\Command; use Hyperf\Command\Annotation\Command; @@ -13,13 +27,13 @@ use Symfony\Component\Console\Input\InputOption; class JWTCommand extends HyperfCommand { /** - * 执行的命令行 + * 执行的命令行. * * @var string */ - protected $name = 'jwt:publish'; + protected ?string $name = 'jwt:publish'; - public function handle() + public function handle(): void { // 从 $input 获取 config 参数 $argument = $this->input->getOption('config'); @@ -39,16 +53,17 @@ class JWTCommand extends HyperfCommand protected function getOptions() { return [ - ['config', NULL, InputOption::VALUE_NONE, 'Publish the configuration for jwt-auth'] + ['config', null, InputOption::VALUE_NONE, 'Publish the configuration for jwt-auth'], ]; } /** - * 复制文件到指定的目录中 + * 复制文件到指定的目录中. + * * @param $copySource * @param $toSource */ - protected function copySource($copySource, $toSource) + protected function copySource($copySource, $toSource): void { copy($copySource, $toSource); }