style: apply php-cs-fixer fixes

This commit is contained in:
Steven Qiu 2025-06-28 06:17:40 +08:00
parent 74ce668221
commit cfda2a6bf8
No known key found for this signature in database
GPG Key ID: 8ACE9DCFC76F38B9
3 changed files with 41 additions and 40 deletions

74
.vscode/launch.json vendored
View File

@ -1,38 +1,40 @@
{ {
"version": "0.2.0", "version": "0.2.0",
"configurations": [ "configurations": [
{ {
"type": "node", "name": "Listen for Xdebug",
"request": "launch", "type": "php",
"name": "Launch Jest Tests", "request": "launch",
"program": "${workspaceFolder}/node_modules/.bin/jest", "port": 9003
"args": ["${file}"], },
"internalConsoleOptions": "openOnSessionStart", {
"skipFiles": [ "type": "node",
"<node_internals>/**" "request": "launch",
] "name": "Launch Jest Tests",
}, "program": "${workspaceFolder}/node_modules/.bin/jest",
{ "args": ["${file}"],
"type": "php", "internalConsoleOptions": "openOnSessionStart",
"request": "launch", "skipFiles": ["<node_internals>/**"]
"name": "Launch with XDebug", },
"ignore": [ {
"**/vendor/**/*.php" "type": "php",
] "request": "launch",
}, "name": "Launch with XDebug",
{ "ignore": ["**/vendor/**/*.php"]
"type": "firefox", },
"request": "launch", {
"reAttach": true, "type": "firefox",
"name": "Launch with Firefox Debugger", "request": "launch",
"url": "http://localhost/", "reAttach": true,
"webRoot": "${workspaceFolder}", "name": "Launch with Firefox Debugger",
"pathMappings": [ "url": "http://localhost/",
{ "webRoot": "${workspaceFolder}",
"url": "webpack:///", "pathMappings": [
"path": "${workspaceFolder}/" {
} "url": "webpack:///",
] "path": "${workspaceFolder}/"
} }
] ]
}
]
} }

View File

@ -5,7 +5,6 @@ namespace App\Providers;
use App\Models\Scope; use App\Models\Scope;
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider; use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
use Illuminate\Support\Facades\Cache; use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\Facades\Storage; use Illuminate\Support\Facades\Storage;
use Laravel\Passport\Passport; use Laravel\Passport\Passport;
@ -51,7 +50,7 @@ class AuthServiceProvider extends ServiceProvider
* Or change how scopes are registered so they don't depend on the database, * Or change how scopes are registered so they don't depend on the database,
* but that may introduce BREAKING CHANGES and plugin incompatibility. * but that may introduce BREAKING CHANGES and plugin incompatibility.
* PRs welcome for better solutions! * PRs welcome for better solutions!
*/ */
$scopes = (app()->runningUnitTests() || !Storage::disk('root')->exists('storage/install.lock')) ? [] : Cache::rememberForever('scopes', function () { $scopes = (app()->runningUnitTests() || !Storage::disk('root')->exists('storage/install.lock')) ? [] : Cache::rememberForever('scopes', function () {
return Scope::pluck('description', 'name')->toArray(); return Scope::pluck('description', 'name')->toArray();
}); });

View File

@ -25,7 +25,7 @@ class UpdateCommandTest extends TestCase
* Yeah I know it's FUCKING UGLY * Yeah I know it's FUCKING UGLY
* But it's the only FUCKING way that WORKS * But it's the only FUCKING way that WORKS
* SOMEONE REFACTOR THIS SHIT PLEASE, I BEG * SOMEONE REFACTOR THIS SHIT PLEASE, I BEG
*/ */
Cache::partialMock()->shouldReceive('flush')->once(); Cache::partialMock()->shouldReceive('flush')->once();
$mock = \Mockery::mock(\Illuminate\Contracts\Cache\Repository::class); $mock = \Mockery::mock(\Illuminate\Contracts\Cache\Repository::class);
$mock->shouldReceive('put'); $mock->shouldReceive('put');