Test Setup Failed
Push — master ( fb1968...58d717 )
by Ben
06:44
created
app/Providers/ChiefServiceProvider.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
          */
79 79
         $this->bootFrontendEssentials();
80 80
 
81
-        if (! $this->app->make(AdminEnvironment::class)->check(request())) {
81
+        if (!$this->app->make(AdminEnvironment::class)->check(request())) {
82 82
             return;
83 83
         }
84 84
 
@@ -108,18 +108,18 @@  discard block
 block discarded – undo
108 108
 
109 109
     public function register()
110 110
     {
111
-        $this->mergeConfigFrom(__DIR__ . '/../../config/chief.php', 'chief');
112
-        $this->mergeConfigFrom(__DIR__ . '/../../config/chief-settings.php', 'chief-settings');
111
+        $this->mergeConfigFrom(__DIR__.'/../../config/chief.php', 'chief');
112
+        $this->mergeConfigFrom(__DIR__.'/../../config/chief-settings.php', 'chief-settings');
113 113
 
114 114
         if ($this->app->runningInConsole()) {
115 115
             (new ConsoleServiceProvider($this->app))->register();
116 116
         }
117 117
 
118
-        $this->app->singleton(Registry::class, function () {
118
+        $this->app->singleton(Registry::class, function() {
119 119
             return new Registry([]);
120 120
         });
121 121
 
122
-        $this->app->singleton(Settings::class, function () {
122
+        $this->app->singleton(Settings::class, function() {
123 123
             return new Settings();
124 124
         });
125 125
 
@@ -130,12 +130,12 @@  discard block
 block discarded – undo
130 130
         if ($this->app->make(AdminEnvironment::class)->check(request())) {
131 131
             $this->app->when(SettingsController::class)
132 132
                 ->needs(SettingFields::class)
133
-                ->give(function () {
133
+                ->give(function() {
134 134
                     return new SettingFields(new Settings());
135 135
                 });
136 136
 
137 137
             // Global chief nav singleton
138
-            $this->app->singleton(Nav::class, function () {
138
+            $this->app->singleton(Nav::class, function() {
139 139
                 return new Nav();
140 140
             });
141 141
 
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
             'role' => \Thinktomorrow\Chief\Admin\Authorization\Role::class,
170 170
         ];
171 171
 
172
-        Auth::provider('chief-eloquent', function ($app, array $config) {
172
+        Auth::provider('chief-eloquent', function($app, array $config) {
173 173
             return new ChiefUserProvider($app['hash'], $config['model']);
174 174
         });
175 175
     }
@@ -177,10 +177,10 @@  discard block
 block discarded – undo
177 177
     private function bootChiefSquanto(): void
178 178
     {
179 179
         // Project specific squanto files
180
-        $this->app['view']->addNamespace('squanto', __DIR__ . '/../../resources/views/vendor/squanto');
180
+        $this->app['view']->addNamespace('squanto', __DIR__.'/../../resources/views/vendor/squanto');
181 181
 
182 182
         // Chief squanto defaults
183
-        $this->app['view']->addNamespace('squanto', base_path() . '/resources/views/vendor/thinktomorrow/chief/vendor/squanto');
183
+        $this->app['view']->addNamespace('squanto', base_path().'/resources/views/vendor/thinktomorrow/chief/vendor/squanto');
184 184
 
185 185
         // Use the chief routing
186 186
         $this->app['config']['squanto.use_default_routes'] = false;
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
         // User events
192 192
         Event::listen(Login::class, LogSuccessfulLogin::class);
193 193
         Event::listen(UserInvited::class, SendInvite::class);
194
-        Event::listen(InviteAccepted::class, EnableUser::class . '@onAcceptingInvite');
194
+        Event::listen(InviteAccepted::class, EnableUser::class.'@onAcceptingInvite');
195 195
 
196 196
         // Managed model events
197 197
         Event::listen(ManagedModelCreated::class, [CreateUrlForPage::class, 'onManagedModelCreated']);
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
         Relation::morphMap(['chiefuser' => User::class]);
240 240
         Relation::morphMap(['menuitem' => MenuItem::class]);
241 241
 
242
-        Blade::directive('fragments', function () {
242
+        Blade::directive('fragments', function() {
243 243
             return '<?php echo app(\\Thinktomorrow\\Chief\\Fragments\\FragmentsRenderer::class)->render($model instanceof \Thinktomorrow\Chief\Shared\Concerns\Nestable\Tree\NestedNode ? $model->getModel() : $model, get_defined_vars()); ?>';
244 244
         });
245 245
     }
Please login to merge, or discard this patch.