Skip to content

Commit eb82c06

Browse files
committed
Some cleaning
1 parent 47fa33e commit eb82c06

File tree

3 files changed

+8
-18
lines changed

3 files changed

+8
-18
lines changed

src/Composers/SidebarViewComposer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
namespace TypiCMS\Modules\Blocks\Composers;
44

5-
use Illuminate\Contracts\View\View;
65
use Illuminate\Support\Facades\Gate;
6+
use Illuminate\View\View;
77
use Maatwebsite\Sidebar\SidebarGroup;
88
use Maatwebsite\Sidebar\SidebarItem;
99

src/Providers/ModuleServiceProvider.php

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,19 @@
44

55
use Illuminate\Foundation\AliasLoader;
66
use Illuminate\Support\Facades\Blade;
7+
use Illuminate\Support\Facades\View;
78
use Illuminate\Support\ServiceProvider;
89
use TypiCMS\Modules\Blocks\Composers\SidebarViewComposer;
910
use TypiCMS\Modules\Blocks\Facades\Blocks;
1011
use TypiCMS\Modules\Blocks\Models\Block;
1112

1213
class ModuleServiceProvider extends ServiceProvider
1314
{
14-
public function boot()
15+
public function boot(): void
1516
{
1617
$this->mergeConfigFrom(__DIR__.'/../config/config.php', 'typicms.blocks');
1718
$this->mergeConfigFrom(__DIR__.'/../config/permissions.php', 'typicms.permissions');
1819

19-
$modules = $this->app['config']['typicms']['modules'];
20-
$this->app['config']->set('typicms.modules', array_merge(['blocks' => []], $modules));
21-
2220
$this->loadViewsFrom(__DIR__.'/../../resources/views/', 'blocks');
2321

2422
$this->publishes([
@@ -35,21 +33,13 @@ public function boot()
3533
return "<?php echo Blocks::render({$name}) ?>";
3634
});
3735

38-
/*
39-
* Sidebar view composer
40-
*/
41-
$this->app->view->composer('core::admin._sidebar', SidebarViewComposer::class);
36+
View::composer('core::admin._sidebar', SidebarViewComposer::class);
4237
}
4338

44-
public function register()
39+
public function register(): void
4540
{
46-
$app = $this->app;
47-
48-
/*
49-
* Register route service provider
50-
*/
51-
$app->register(RouteServiceProvider::class);
41+
$this->app->register(RouteServiceProvider::class);
5242

53-
$app->bind('Blocks', Block::class);
43+
$this->app->bind('Blocks', Block::class);
5444
}
5545
}

src/Providers/RouteServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
class RouteServiceProvider extends ServiceProvider
1212
{
13-
public function map()
13+
public function map(): void
1414
{
1515
/*
1616
* Admin routes

0 commit comments

Comments
 (0)