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

View File

@ -5,7 +5,6 @@ namespace App\Providers;
use App\Models\Scope;
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\Facades\Storage;
use Laravel\Passport\Passport;
@ -42,7 +41,7 @@ class AuthServiceProvider extends ServiceProvider
'ReportsManagement.ReadWrite' => 'auth.oauth.scope.reports-management.readwrite',
];
/*
/*
* Return empty scopes if running unit tests or before installation.
* In these cases, migrations arent run yet, so DB queries will fail.
* OAuth isnt tested in unit tests, so returning empty scopes should be fine...?
@ -51,7 +50,7 @@ class AuthServiceProvider extends ServiceProvider
* Or change how scopes are registered so they don't depend on the database,
* but that may introduce BREAKING CHANGES and plugin incompatibility.
* PRs welcome for better solutions!
*/
*/
$scopes = (app()->runningUnitTests() || !Storage::disk('root')->exists('storage/install.lock')) ? [] : Cache::rememberForever('scopes', function () {
return Scope::pluck('description', 'name')->toArray();
});

View File

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