Test Setup Failed
Push — livewire-table ( 15c595...843dc4 )
by Ben
09:28
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.
app/Http/Requests/MenuRequest.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -49,9 +49,9 @@  discard block
 block discarded – undo
49 49
                 continue;
50 50
             }
51 51
 
52
-            $rules['trans.' . $locale . '.label'] = 'required';
53
-            if ($this->request->get('trans.' . $locale . '.url') != null) {
54
-                $rules['trans.' . $locale . '.url'] = 'url';
52
+            $rules['trans.'.$locale.'.label'] = 'required';
53
+            if ($this->request->get('trans.'.$locale.'.url') != null) {
54
+                $rules['trans.'.$locale.'.url'] = 'url';
55 55
             }
56 56
         }
57 57
 
@@ -63,8 +63,8 @@  discard block
 block discarded – undo
63 63
         $attributes = [];
64 64
 
65 65
         foreach (array_keys($this->request->all('trans')) as $locale) {
66
-            $attributes['trans.' . $locale . '.label'] = $locale . ' label';
67
-            $attributes['trans.' . $locale . '.url'] = $locale . ' link';
66
+            $attributes['trans.'.$locale.'.label'] = $locale.' label';
67
+            $attributes['trans.'.$locale.'.url'] = $locale.' link';
68 68
         }
69 69
 
70 70
         $attributes['owner_reference'] = 'Interne pagina';
@@ -95,10 +95,10 @@  discard block
 block discarded – undo
95 95
 
96 96
             // Check if it is a relative
97 97
             if ($this->isRelativeUrl($trans['url'])) {
98
-                $data['trans'][$locale]['url'] = '/' . trim($trans['url'], '/');
99
-            } elseif(Str::startsWith($trans['url'], ['mailto:', 'tel:', 'https://', 'http://'])) {
98
+                $data['trans'][$locale]['url'] = '/'.trim($trans['url'], '/');
99
+            } elseif (Str::startsWith($trans['url'], ['mailto:', 'tel:', 'https://', 'http://'])) {
100 100
                 $data['trans'][$locale]['url'] = $trans['url'];
101
-            } else {
101
+            }else {
102 102
                 $data['trans'][$locale]['url'] = Url::fromString($trans['url'])->secure()->get();
103 103
             }
104 104
 
@@ -115,6 +115,6 @@  discard block
 block discarded – undo
115 115
         // Check if passed url is not intended as a host instead of a relative path
116 116
         $notIntentedAsRoot = (null == Root::fromString($url)->getScheme() && false === strpos($url, '.'));
117 117
 
118
-        return ($notIntentedAsRoot && in_array($url, [$nakedUrl, '/' . $nakedUrl]));
118
+        return ($notIntentedAsRoot && in_array($url, [$nakedUrl, '/'.$nakedUrl]));
119 119
     }
120 120
 }
Please login to merge, or discard this patch.