From ebb8cafc13708f348765792ad9f9fbfd5be2a728 Mon Sep 17 00:00:00 2001 From: "iVampireSP.com" Date: Tue, 22 Nov 2022 20:23:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=20=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Console/Commands/Status.php | 5 +- app/Console/Commands/UserAddBalance.php | 3 +- composer.json | 2 + composer.lock | 115 +++++++++++++++++++++++- 4 files changed, 121 insertions(+), 4 deletions(-) diff --git a/app/Console/Commands/Status.php b/app/Console/Commands/Status.php index a941498..f2f2be5 100644 --- a/app/Console/Commands/Status.php +++ b/app/Console/Commands/Status.php @@ -2,7 +2,7 @@ namespace App\Console\Commands; -use DB; +use Illuminate\Support\Facades\DB; use Illuminate\Console\Command; use Illuminate\Support\Facades\Redis; @@ -50,6 +50,7 @@ public function handle() $mysql_version = DB::select('select version() as version')[0]->version; + $this->warn('MySQL 版本: ' . $mysql_version); @@ -112,5 +113,7 @@ public function handle() $this->warn('===== 莱云 统计 ====='); $this->warn('要获取 莱云 统计信息,请运行 count 命令。'); + return 0; + } } diff --git a/app/Console/Commands/UserAddBalance.php b/app/Console/Commands/UserAddBalance.php index da08cb7..ae42727 100644 --- a/app/Console/Commands/UserAddBalance.php +++ b/app/Console/Commands/UserAddBalance.php @@ -69,8 +69,7 @@ public function handle() $user->refresh(); $this->info($user->name . ', 当前余额: ' . $user->balance); } catch (ChargeException $e) { - - return $this->error($e->getMessage()); + $this->error('充值失败: ' . $e->getMessage()); } return 0; diff --git a/composer.json b/composer.json index 52b6b78..706f004 100644 --- a/composer.json +++ b/composer.json @@ -25,11 +25,13 @@ }, "require-dev": { "fakerphp/faker": "^1.9.1", + "jetbrains/phpstorm-attributes": "^1.0", "laravel/pint": "^1.0", "laravel/sail": "^1.0.1", "laravel/telescope": "^4.9", "mockery/mockery": "^1.4.4", "nunomaduro/collision": "^6.1", + "phpstan/phpstan": "^1.9", "phpunit/phpunit": "^9.5.10", "spatie/laravel-ignition": "^1.0" }, diff --git a/composer.lock b/composer.lock index a17c5e2..b8ffc71 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "5f8a7f2c6c74886b559f6212aeea28aa", + "content-hash": "6d925a2d2bb0d0c62b8cc85675e99772", "packages": [ { "name": "brick/math", @@ -8521,6 +8521,54 @@ }, "time": "2020-07-09T08:09:16+00:00" }, + { + "name": "jetbrains/phpstorm-attributes", + "version": "1.0", + "source": { + "type": "git", + "url": "https://github.com/JetBrains/phpstorm-attributes.git", + "reference": "a7a83ae5df4dd3c0875484483de19de8edf60a9f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/JetBrains/phpstorm-attributes/zipball/a7a83ae5df4dd3c0875484483de19de8edf60a9f", + "reference": "a7a83ae5df4dd3c0875484483de19de8edf60a9f", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "type": "library", + "autoload": { + "psr-4": { + "JetBrains\\PhpStorm\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "JetBrains", + "homepage": "https://www.jetbrains.com" + } + ], + "description": "PhpStorm specific attributes", + "keywords": [ + "attributes", + "jetbrains", + "phpstorm" + ], + "support": { + "issues": "https://youtrack.jetbrains.com/newIssue?project=WI", + "source": "https://github.com/JetBrains/phpstorm-attributes/tree/1.0" + }, + "time": "2020-11-17T11:09:47+00:00" + }, { "name": "laravel/pint", "version": "v1.1.3", @@ -9093,6 +9141,71 @@ }, "time": "2022-02-21T01:04:05+00:00" }, + { + "name": "phpstan/phpstan", + "version": "1.9.2", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpstan.git", + "reference": "d6fdf01c53978b6429f1393ba4afeca39cc68afa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/d6fdf01c53978b6429f1393ba4afeca39cc68afa", + "reference": "d6fdf01c53978b6429f1393ba4afeca39cc68afa", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.2|^8.0" + }, + "conflict": { + "phpstan/phpstan-shim": "*" + }, + "bin": [ + "phpstan", + "phpstan.phar" + ], + "type": "library", + "autoload": { + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPStan - PHP Static Analysis Tool", + "keywords": [ + "dev", + "static analysis" + ], + "support": { + "issues": "https://github.com/phpstan/phpstan/issues", + "source": "https://github.com/phpstan/phpstan/tree/1.9.2" + }, + "funding": [ + { + "url": "https://github.com/ondrejmirtes", + "type": "github" + }, + { + "url": "https://github.com/phpstan", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan", + "type": "tidelift" + } + ], + "time": "2022-11-10T09:56:11+00:00" + }, { "name": "phpunit/php-code-coverage", "version": "9.2.17",