Test Setup Failed
Push — ft/multisite-form ( bbe3ae...acb952 )
by
unknown
07:05
created
app/Providers/RoutesServiceProvider.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -37,10 +37,10 @@  discard block
 block discarded – undo
37 37
             return;
38 38
         }
39 39
 
40
-        app()->booted(function () {
40
+        app()->booted(function() {
41 41
             $routeName = config('chief.route.name');
42 42
 
43
-            Route::get('{slug?}', function ($slug = '/') {
43
+            Route::get('{slug?}', function($slug = '/') {
44 44
                 return ChiefResponse::fromSlug($slug);
45 45
             })->name($routeName)
46 46
                 ->where('slug', '(.*)?')
@@ -50,14 +50,14 @@  discard block
 block discarded – undo
50 50
 
51 51
     private function loadOpenAdminRoutes(): void
52 52
     {
53
-        Route::group(['prefix' => config('chief.route.prefix', 'admin'), 'middleware' => ['web']], function () {
53
+        Route::group(['prefix' => config('chief.route.prefix', 'admin'), 'middleware' => ['web']], function() {
54 54
             $this->loadRoutesFrom(__DIR__.'/../../routes/chief-open-routes.php');
55 55
         });
56 56
     }
57 57
 
58 58
     private function loadAdminRoutes(): void
59 59
     {
60
-        Route::group(['prefix' => config('chief.route.prefix', 'admin'), 'middleware' => ['web-chief', 'auth:chief']], function () {
60
+        Route::group(['prefix' => config('chief.route.prefix', 'admin'), 'middleware' => ['web-chief', 'auth:chief']], function() {
61 61
             $this->loadRoutesFrom(__DIR__.'/../../routes/chief-admin-routes.php');
62 62
 
63 63
             // Add project specific chief routing...
Please login to merge, or discard this patch.
app/Http/Controllers/Back/Authorization/PermissionController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
         $roles = $request['roles'];
50 50
 
51 51
         $permission->save();
52
-        if (! empty($request['roles'])) {
52
+        if (!empty($request['roles'])) {
53 53
             foreach ($roles as $role) {
54 54
                 $r = Role::where('id', '=', $role)->firstOrFail(); // Match input role to db record
55 55
                 $permission = Permission::where('name', '=', $name)->first();
Please login to merge, or discard this patch.
app/Http/Controllers/Back/Users/UserController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@
 block discarded – undo
95 95
         $user = User::findOrFail($id);
96 96
 
97 97
         // Only another developer can change another developer.
98
-        if (! chiefAdmin()->hasRole('developer') && ($user->hasRole('developer') || in_array('developer', $request->get('roles', [])))) {
98
+        if (!chiefAdmin()->hasRole('developer') && ($user->hasRole('developer') || in_array('developer', $request->get('roles', [])))) {
99 99
             throw new AuthorizationException('Constraint: Only an user with role developer can update an user with developer role.');
100 100
         }
101 101
 
Please login to merge, or discard this patch.
app/Http/Controllers/Api/MediaGalleryController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,14 +25,14 @@
 block discarded – undo
25 25
         $links = Asset::with('media')
26 26
             ->orderBy('created_at', 'DESC')
27 27
             ->whereNotIn('id', $excluded)
28
-            ->whereHas('media', function (Builder $query) use ($search) {
28
+            ->whereHas('media', function(Builder $query) use ($search) {
29 29
                 $query->where('mime_type', 'LIKE', '%image%');
30 30
                 $query->where('name', 'LIKE', '%'.$search.'%');
31 31
             })
32 32
             ->offset($offset)
33 33
             ->limit($limit)
34 34
             ->get()
35
-            ->map(function ($asset) use ($conversion) {
35
+            ->map(function($asset) use ($conversion) {
36 36
                 return [
37 37
                     'id' => $asset->id,
38 38
                     'url' => $asset->url($conversion),
Please login to merge, or discard this patch.
app/Http/Requests/MenuRequest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@
 block discarded – undo
94 94
                 $data['trans'][$locale]['url'] = '/'.trim($trans['url'], '/');
95 95
             } elseif (Str::startsWith($trans['url'], ['mailto:', 'tel:', 'https://', 'http://'])) {
96 96
                 $data['trans'][$locale]['url'] = $trans['url'];
97
-            } else {
97
+            }else {
98 98
                 $data['trans'][$locale]['url'] = Url::fromString($trans['url'])->secure()->get();
99 99
             }
100 100
 
Please login to merge, or discard this patch.
app/Exceptions/ChiefExceptionHandler.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -61,12 +61,12 @@  discard block
 block discarded – undo
61 61
 
62 62
     private function shouldRenderChiefException(Throwable $exception): bool
63 63
     {
64
-        return Str::startsWith(request()->path(), 'admin/') && ! $exception instanceof AuthenticationException && ! $exception instanceof ValidationException;
64
+        return Str::startsWith(request()->path(), 'admin/') && !$exception instanceof AuthenticationException && !$exception instanceof ValidationException;
65 65
     }
66 66
 
67 67
     protected function renderChiefException(\Illuminate\Http\Request $request, Throwable $exception)
68 68
     {
69
-        if (! config('app.debug')) {
69
+        if (!config('app.debug')) {
70 70
             if ($request->expectsJson()) {
71 71
                 return response()->json(['error' => 'Something went wrong.'], 404);
72 72
             }
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
             ], 401);
99 99
         }
100 100
 
101
-        if (! empty($exception->guards()) && Arr::first($exception->guards()) == 'chief') {
101
+        if (!empty($exception->guards()) && Arr::first($exception->guards()) == 'chief') {
102 102
             return redirect()->guest(route('chief.back.login'));
103 103
         }
104 104
 
Please login to merge, or discard this patch.
app/Console/CreateAdmin.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -18,11 +18,11 @@  discard block
 block discarded – undo
18 18
         $firstname = null;
19 19
         $lastname = null;
20 20
 
21
-        while (! $firstname) {
21
+        while (!$firstname) {
22 22
             $firstname = $this->ask('Firstname');
23 23
         }
24 24
 
25
-        while (! $lastname) {
25
+        while (!$lastname) {
26 26
             $lastname = $this->ask('Lastname');
27 27
         }
28 28
 
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 
33 33
         if ($this->option('dev')) {
34 34
             $role = 'developer';
35
-        } else {
35
+        }else {
36 36
             $role = 'admin';
37 37
         }
38 38
 
@@ -43,11 +43,11 @@  discard block
 block discarded – undo
43 43
 
44 44
     private function settingPermissionsAndRoles(): void
45 45
     {
46
-        AuthorizationDefaults::permissions()->each(function ($permissionName) {
46
+        AuthorizationDefaults::permissions()->each(function($permissionName) {
47 47
             Artisan::call('chief:permission', ['name' => $permissionName]);
48 48
         });
49 49
 
50
-        AuthorizationDefaults::roles()->each(function ($defaultPermissions, $roleName) {
50
+        AuthorizationDefaults::roles()->each(function($defaultPermissions, $roleName) {
51 51
             Artisan::call('chief:role', ['name' => $roleName, '--permissions' => implode(',', $defaultPermissions)]);
52 52
         });
53 53
 
Please login to merge, or discard this patch.
app/Console/RefreshDatabase.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
         }
19 19
 
20 20
         if ($this->option('reset')) {
21
-            if (! $this->confirm('You are about to force reset the database in the '.app()->environment().' environment! ARE YOU SURE?')) {
21
+            if (!$this->confirm('You are about to force reset the database in the '.app()->environment().' environment! ARE YOU SURE?')) {
22 22
                 $this->info('aborting.');
23 23
 
24 24
                 return;
Please login to merge, or discard this patch.
app/Console/ImportRedirects.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
     public function handle(): void
27 27
     {
28 28
         // CSV should consist of: locale - redirect url - target -url
29
-        $this->loop($this->argument('file'), function ($row) {
29
+        $this->loop($this->argument('file'), function($row) {
30 30
             try {
31 31
                 $this->addRedirect->handle($row[0], $row[1], $row[2]);
32 32
             } catch (UrlRecordNotFound $e) {
Please login to merge, or discard this patch.