12
12
13
13
class AmpersandServiceProvider extends ServiceProvider
14
14
{
15
- public function boot ()
15
+ public function boot (): void
16
16
{
17
17
if ($ this ->app ->runningInConsole ()) {
18
18
$ this ->publishes ([
@@ -24,7 +24,7 @@ public function boot()
24
24
}
25
25
}
26
26
27
- public function register ()
27
+ public function register (): void
28
28
{
29
29
$ this ->setup ();
30
30
$ this ->registerRepositories ();
@@ -33,20 +33,20 @@ public function register()
33
33
$ this ->app ->register (RouteServiceProvider::class);
34
34
}
35
35
36
- private function setup ()
36
+ private function setup (): void
37
37
{
38
38
$ this ->loadViewsFrom (__DIR__ . '/resources/views ' , 'ampersand ' );
39
39
40
40
$ this ->mergeConfigFrom (__DIR__ . '/config/ampersand.php ' , 'ampersand ' );
41
41
42
42
// Add a disk to the filesystem
43
- $ this -> app [ ' config ' ] ->set ('filesystems.disks.ampersand::posts ' , [
43
+ config () ->set ('filesystems.disks.ampersand::posts ' , [
44
44
'driver ' => 'local ' ,
45
45
'root ' => config ('ampersand.posts_path ' )
46
46
]);
47
47
48
48
// Overload sheets config to avoid local conflicts
49
- $ this -> app [ ' config ' ] ->set ('sheets.collections ' , [
49
+ config () ->set ('sheets.collections ' , [
50
50
'posts ' => [
51
51
'disk ' => 'ampersand::posts ' ,
52
52
'sheet_class ' => Post::class,
@@ -57,12 +57,12 @@ private function setup()
57
57
]);
58
58
}
59
59
60
- private function registerRepositories ()
60
+ private function registerRepositories (): void
61
61
{
62
62
$ this ->app ->singleton (PostRepository::class);
63
63
}
64
64
65
- private function registerCommands ()
65
+ private function registerCommands (): void
66
66
{
67
67
$ this ->commands ([
68
68
NewPost::class
0 commit comments