Code cleanup from inspection results
This commit is contained in:
@@ -259,6 +259,7 @@ class InstallerController extends Controller
|
||||
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
|
||||
* @throws \RuntimeException
|
||||
* @throws \Prettus\Validator\Exceptions\ValidatorException
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function usersetup(Request $request)
|
||||
{
|
||||
|
||||
@@ -2,14 +2,13 @@
|
||||
|
||||
namespace Modules\Installer\Providers;
|
||||
|
||||
use App\Services\ModuleService;
|
||||
use Illuminate\Database\Eloquent\Factory;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Route;
|
||||
|
||||
|
||||
class InstallerServiceProvider extends ServiceProvider
|
||||
{
|
||||
protected $defer = false;
|
||||
protected $moduleSvc;
|
||||
|
||||
/**
|
||||
@@ -17,7 +16,7 @@ class InstallerServiceProvider extends ServiceProvider
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
$this->moduleSvc = app('App\Services\ModuleService');
|
||||
$this->moduleSvc = app(ModuleService::class);
|
||||
|
||||
$this->registerRoutes();
|
||||
$this->registerTranslations();
|
||||
@@ -78,9 +77,15 @@ class InstallerServiceProvider extends ServiceProvider
|
||||
$sourcePath => $viewPath
|
||||
],'views');
|
||||
|
||||
$this->loadViewsFrom(array_merge(array_map(function ($path) {
|
||||
return $path . '/modules/installer';
|
||||
}, \Config::get('view.paths')), [$sourcePath]), 'installer');
|
||||
$paths = array_map(
|
||||
function ($path) {
|
||||
return $path.'/modules/installer';
|
||||
},
|
||||
\Config::get('view.paths')
|
||||
);
|
||||
|
||||
$paths[] = $sourcePath;
|
||||
$this->loadViewsFrom($paths, 'installer');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -111,7 +116,7 @@ class InstallerServiceProvider extends ServiceProvider
|
||||
/**
|
||||
* Get the services provided by the provider.
|
||||
*/
|
||||
public function provides()
|
||||
public function provides(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ class RequirementsService extends Service
|
||||
$extensions = [];
|
||||
foreach(config('installer.extensions') as $ext) {
|
||||
$pass = true;
|
||||
if(!extension_loaded($ext)) {
|
||||
if(!\extension_loaded($ext)) {
|
||||
$pass = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,14 +2,13 @@
|
||||
|
||||
namespace Modules\Sample\Providers;
|
||||
|
||||
use App\Services\ModuleService;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Illuminate\Database\Eloquent\Factory;
|
||||
use Route;
|
||||
|
||||
|
||||
class SampleServiceProvider extends ServiceProvider
|
||||
{
|
||||
protected $defer = false;
|
||||
protected $moduleSvc;
|
||||
|
||||
/**
|
||||
@@ -17,7 +16,7 @@ class SampleServiceProvider extends ServiceProvider
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
$this->moduleSvc = app('App\Services\ModuleService');
|
||||
$this->moduleSvc = app(ModuleService::class);
|
||||
|
||||
$this->registerRoutes();
|
||||
$this->registerTranslations();
|
||||
@@ -121,9 +120,15 @@ class SampleServiceProvider extends ServiceProvider
|
||||
$sourcePath => $viewPath
|
||||
],'views');
|
||||
|
||||
$this->loadViewsFrom(array_merge(array_map(function ($path) {
|
||||
return $path . '/modules/sample';
|
||||
}, \Config::get('view.paths')), [$sourcePath]), 'sample');
|
||||
$paths = array_map(
|
||||
function ($path) {
|
||||
return $path.'/modules/sample';
|
||||
},
|
||||
\Config::get('view.paths')
|
||||
);
|
||||
|
||||
$paths[] = $sourcePath;
|
||||
$this->loadViewsFrom($paths, 'sample');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -154,7 +159,7 @@ class SampleServiceProvider extends ServiceProvider
|
||||
/**
|
||||
* Get the services provided by the provider.
|
||||
*/
|
||||
public function provides()
|
||||
public function provides(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
@@ -3,13 +3,10 @@
|
||||
namespace Modules\Vacentral\Providers;
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Illuminate\Database\Eloquent\Factory;
|
||||
use Route;
|
||||
|
||||
use App\Services\ModuleService;
|
||||
|
||||
class AppServiceProvider extends ServiceProvider
|
||||
{
|
||||
protected $defer = false;
|
||||
protected $moduleSvc;
|
||||
|
||||
/**
|
||||
@@ -17,7 +14,7 @@ class AppServiceProvider extends ServiceProvider
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
$this->moduleSvc = app('App\Services\ModuleService');
|
||||
$this->moduleSvc = app(ModuleService::class);
|
||||
$this->registerConfig();
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
namespace Modules\Vacentral\Providers;
|
||||
|
||||
use App\Events\PirepAccepted;
|
||||
use App\Events\TestEvent;
|
||||
use Modules\Vacentral\Listeners\PirepAcceptedEventListener;
|
||||
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
|
||||
|
||||
@@ -15,12 +14,4 @@ class EventServiceProvider extends ServiceProvider
|
||||
protected $listen = [
|
||||
PirepAccepted::class => [PirepAcceptedEventListener::class],
|
||||
];
|
||||
|
||||
/**
|
||||
* Register any events for your application.
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
parent::boot();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user