style: apply php-cs-fixer fixes
This commit is contained in:
parent
74ce668221
commit
cfda2a6bf8
74
.vscode/launch.json
vendored
74
.vscode/launch.json
vendored
|
|
@ -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}/"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
|
||||||
|
|
@ -42,7 +41,7 @@ class AuthServiceProvider extends ServiceProvider
|
||||||
'ReportsManagement.ReadWrite' => 'auth.oauth.scope.reports-management.readwrite',
|
'ReportsManagement.ReadWrite' => 'auth.oauth.scope.reports-management.readwrite',
|
||||||
];
|
];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Return empty scopes if running unit tests or before installation.
|
* Return empty scopes if running unit tests or before installation.
|
||||||
* In these cases, migrations aren’t run yet, so DB queries will fail.
|
* In these cases, migrations aren’t run yet, so DB queries will fail.
|
||||||
* OAuth isn’t tested in unit tests, so returning empty scopes should be fine...?
|
* OAuth isn’t 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,
|
* 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();
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -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');
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user