diff --git a/app/Enums/ResponseCode.php b/app/Enums/ResponseCode.php index fc75480..5ac1d89 100644 --- a/app/Enums/ResponseCode.php +++ b/app/Enums/ResponseCode.php @@ -1,5 +1,14 @@ + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + namespace App\Enums; use Jiannei\Enum\Laravel\Support\Traits\EnumEnhance; @@ -26,4 +35,4 @@ enum ResponseCode: int case SYSTEM_CACHE_CONFIG_ERROR = 500003; case SYSTEM_CACHE_MISSED_ERROR = 500004; case SYSTEM_CONFIG_ERROR = 500005; -} \ No newline at end of file +} diff --git a/app/Http/Controllers/AuthController.php b/app/Http/Controllers/AuthController.php index caad1b4..d28468c 100644 --- a/app/Http/Controllers/AuthController.php +++ b/app/Http/Controllers/AuthController.php @@ -34,7 +34,7 @@ public function login() { $credentials = request(['email', 'password']); - if (!$token = auth()->attempt($credentials)) { + if (! $token = auth()->attempt($credentials)) { return Response::errorUnauthorized(); } @@ -77,7 +77,6 @@ public function refresh() * Get the token array structure. * * @param string $token - * * @return \Illuminate\Http\JsonResponse */ protected function respondWithToken($token) diff --git a/app/Http/Controllers/UsersController.php b/app/Http/Controllers/UsersController.php index 91e38a3..bf747ee 100644 --- a/app/Http/Controllers/UsersController.php +++ b/app/Http/Controllers/UsersController.php @@ -18,7 +18,6 @@ class UsersController extends Controller { - public function __construct(private UserService $service) { $this->middleware('auth:api', ['except' => ['store', 'show']]); diff --git a/app/Models/User.php b/app/Models/User.php index 8db4e86..c918701 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -19,7 +19,7 @@ use Laravel\Lumen\Auth\Authorizable; use Tymon\JWTAuth\Contracts\JWTSubject; -class User extends Model implements AuthenticatableContract, AuthorizableContract,JWTSubject +class User extends Model implements AuthenticatableContract, AuthorizableContract, JWTSubject { use Authenticatable, Authorizable, HasFactory; diff --git a/bootstrap/app.php b/bootstrap/app.php index 80fc759..91a4064 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -87,9 +87,9 @@ // App\Http\Middleware\ExampleMiddleware::class // ]); - $app->routeMiddleware([ - 'auth' => App\Http\Middleware\Authenticate::class, - ]); +$app->routeMiddleware([ + 'auth' => App\Http\Middleware\Authenticate::class, +]); /* |-------------------------------------------------------------------------- diff --git a/composer.lock b/composer.lock index bd466d8..d706736 100644 --- a/composer.lock +++ b/composer.lock @@ -3518,7 +3518,7 @@ }, { "name": "symfony/deprecation-contracts", - "version": "v3.3.0", + "version": "v3.4.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", @@ -3565,7 +3565,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.3.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.4.0" }, "funding": [ { @@ -5597,16 +5597,16 @@ "packages-dev": [ { "name": "fakerphp/faker", - "version": "v1.23.0", + "version": "v1.23.1", "source": { "type": "git", "url": "https://github.com/FakerPHP/Faker.git", - "reference": "e3daa170d00fde61ea7719ef47bb09bb8f1d9b01" + "reference": "bfb4fe148adbf78eff521199619b93a52ae3554b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/e3daa170d00fde61ea7719ef47bb09bb8f1d9b01", - "reference": "e3daa170d00fde61ea7719ef47bb09bb8f1d9b01", + "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/bfb4fe148adbf78eff521199619b93a52ae3554b", + "reference": "bfb4fe148adbf78eff521199619b93a52ae3554b", "shasum": "" }, "require": { @@ -5632,11 +5632,6 @@ "ext-mbstring": "Required for multibyte Unicode string functionality." }, "type": "library", - "extra": { - "branch-alias": { - "dev-main": "v1.21-dev" - } - }, "autoload": { "psr-4": { "Faker\\": "src/Faker/" @@ -5659,9 +5654,9 @@ ], "support": { "issues": "https://github.com/FakerPHP/Faker/issues", - "source": "https://github.com/FakerPHP/Faker/tree/v1.23.0" + "source": "https://github.com/FakerPHP/Faker/tree/v1.23.1" }, - "time": "2023-06-12T08:44:38+00:00" + "time": "2024-01-02T13:46:09+00:00" }, { "name": "hamcrest/hamcrest-php", @@ -7425,5 +7420,5 @@ "php": "^8.1" }, "platform-dev": [], - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.6.0" } diff --git a/config/app.php b/config/app.php index a00cbc0..001d324 100644 --- a/config/app.php +++ b/config/app.php @@ -1,5 +1,14 @@ + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + return [ /* diff --git a/config/auth.php b/config/auth.php index 6730da2..86f51d1 100644 --- a/config/auth.php +++ b/config/auth.php @@ -1,5 +1,14 @@ + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + return [ /* @@ -61,8 +70,8 @@ 'providers' => [ 'users' => [ 'driver' => 'eloquent', - 'model' => \App\Models\User::class - ] + 'model' => \App\Models\User::class, + ], ], /* diff --git a/config/response.php b/config/response.php index fde6266..40641ad 100644 --- a/config/response.php +++ b/config/response.php @@ -1,7 +1,7 @@ * diff --git a/database/seeders/DatabaseSeeder.php b/database/seeders/DatabaseSeeder.php index a4e8e96..41c2443 100644 --- a/database/seeders/DatabaseSeeder.php +++ b/database/seeders/DatabaseSeeder.php @@ -22,8 +22,8 @@ class DatabaseSeeder extends Seeder */ public function run() { - $this->call([ - UsersSeeder::class - ]); + $this->call([ + UsersSeeder::class, + ]); } } diff --git a/resources/lang/zh_CN/enums.php b/resources/lang/zh_CN/enums.php index 51e3e78..7818cb1 100644 --- a/resources/lang/zh_CN/enums.php +++ b/resources/lang/zh_CN/enums.php @@ -1,7 +1,7 @@ * diff --git a/routes/web.php b/routes/web.php index 01b2f6a..36dcecd 100644 --- a/routes/web.php +++ b/routes/web.php @@ -21,7 +21,6 @@ */ /** @var \Laravel\Lumen\Routing\Router $router */ - $router->get('/', function () use ($router) { return $router->app->version(); }); @@ -33,4 +32,4 @@ $router->delete('logout', 'AuthController@logout'); $router->put('refresh', 'AuthController@refresh'); $router->get('me', 'AuthController@me'); -}); \ No newline at end of file +});