Test Setup Failed
Branch master (738c6f)
by Philippe
11:40
created
database/migrations/2017_07_27_092137_create_note_table.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
 {
8 8
     public function up()
9 9
     {
10
-        Schema::create('notes', function (Blueprint $table) {
10
+        Schema::create('notes', function(Blueprint $table) {
11 11
             $table->increments('id');
12 12
             $table->boolean('published')->default(0);
13 13
             $table->enum('type', ['general', 'delivery', 'payment']);
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
             $table->timestamps();
19 19
         });
20 20
 
21
-        Schema::create('note_translations', function (Blueprint $table) {
21
+        Schema::create('note_translations', function(Blueprint $table) {
22 22
             $table->increments('id');
23 23
             $table->integer('note_id')->unsigned();
24 24
             $table->string('locale');
Please login to merge, or discard this patch.
database/migrations/2017_07_18_091529_create_jobs_table.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 {
9 9
     public function up()
10 10
     {
11
-        Schema::create('jobs', function (Blueprint $table) {
11
+        Schema::create('jobs', function(Blueprint $table) {
12 12
             $table->bigIncrements('id');
13 13
             $table->string('queue');
14 14
             $table->longText('payload');
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
             $table->index(['queue', 'reserved_at']);
21 21
         });
22 22
 
23
-        Schema::create('failed_jobs', function (Blueprint $table) {
23
+        Schema::create('failed_jobs', function(Blueprint $table) {
24 24
             $table->bigIncrements('id');
25 25
             $table->text('connection');
26 26
             $table->text('queue');
Please login to merge, or discard this patch.
config/chief.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -71,11 +71,11 @@  discard block
 block discarded – undo
71 71
     'mediatypes' => [
72 72
 
73 73
         'default' => [
74
-            (object) [
74
+            (object)[
75 75
                 'type' => MediaType::HERO,
76 76
                 'limit' => 1,
77 77
             ],
78
-            (object) [
78
+            (object)[
79 79
                 'type' => MediaType::THUMB,
80 80
                 'limit' => 1,
81 81
             ]
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
      */
108 108
     'settingFields' => [
109 109
         // TODO: callable can be removed when we set everything up in a service provider
110
-        'homepage' => function () {
110
+        'homepage' => function() {
111 111
             return \Thinktomorrow\Chief\Settings\HomepageFieldGenerator::generate();
112 112
         },
113 113
         'contact.email' => \Thinktomorrow\Chief\Fields\Types\InputField::make('contact.email')
Please login to merge, or discard this patch.
app/Providers/ChiefServiceProvider.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -27,8 +27,8 @@  discard block
 block discarded – undo
27 27
     {
28 28
         $this->registerChiefGuard();
29 29
 
30
-        $this->app['view']->addNamespace('squanto', __DIR__ . '/../../resources/views/vendor/squanto');
31
-        $this->app['view']->addNamespace('squanto', base_path() . '/resources/views/vendor/thinktomorrow/chief/vendor/squanto');
30
+        $this->app['view']->addNamespace('squanto', __DIR__.'/../../resources/views/vendor/squanto');
31
+        $this->app['view']->addNamespace('squanto', base_path().'/resources/views/vendor/thinktomorrow/chief/vendor/squanto');
32 32
 
33 33
         (new MacrosServiceProvider($this->app))->boot();
34 34
         (new AuthServiceProvider($this->app))->boot();
@@ -42,18 +42,18 @@  discard block
 block discarded – undo
42 42
         // Project defaults
43 43
         (new ChiefProjectServiceProvider($this->app))->boot();
44 44
 
45
-        $this->loadRoutesFrom(__DIR__ . '/../routes.php');
46
-        $this->loadViewsFrom(__DIR__ . '/../../resources/views', 'chief');
47
-        $this->loadMigrationsFrom(__DIR__ . '/../../database/migrations');
48
-        $this->loadTranslationsFrom(__DIR__ . '/../../resources/lang', 'chief');
45
+        $this->loadRoutesFrom(__DIR__.'/../routes.php');
46
+        $this->loadViewsFrom(__DIR__.'/../../resources/views', 'chief');
47
+        $this->loadMigrationsFrom(__DIR__.'/../../database/migrations');
48
+        $this->loadTranslationsFrom(__DIR__.'/../../resources/lang', 'chief');
49 49
 
50 50
         $this->publishes([
51
-            __DIR__ . '/../../config/chief.php' => config_path('thinktomorrow/chief.php'),
52
-            __DIR__ . '/../../config/chief-settings.php' => config_path('thinktomorrow/chief-settings.php'),
51
+            __DIR__.'/../../config/chief.php' => config_path('thinktomorrow/chief.php'),
52
+            __DIR__.'/../../config/chief-settings.php' => config_path('thinktomorrow/chief-settings.php'),
53 53
         ], 'chief-config');
54 54
 
55 55
         $this->publishes([
56
-            __DIR__ . '/../../public/chief-assets' => public_path('/chief-assets'),
56
+            __DIR__.'/../../public/chief-assets' => public_path('/chief-assets'),
57 57
         ], 'chief-assets');
58 58
 
59 59
         // Register commands
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
             $this->app->bind('command.chief:admin', CreateAdmin::class);
81 81
             $this->app->bind('command.chief:developer', CreateDeveloper::class);
82 82
             $this->app->bind('command.chief:settings', SeedSettings::class);
83
-            $this->app->bind('command.chief:page', function ($app) {
83
+            $this->app->bind('command.chief:page', function($app) {
84 84
                 return new GeneratePage($app['files'], [
85 85
                     'base_path' => base_path()
86 86
                 ]);
@@ -92,10 +92,10 @@  discard block
 block discarded – undo
92 92
 
93 93
         // Custom validator for requiring on translations only the fallback locale
94 94
         // this is called in the validation as required-fallback-locale
95
-        Validator::extendImplicit('requiredFallbackLocale', function ($attribute, $value, $parameters, $validator) {
95
+        Validator::extendImplicit('requiredFallbackLocale', function($attribute, $value, $parameters, $validator) {
96 96
             $fallbackLocale = config('app.fallback_locale');
97 97
 
98
-            if (false !== strpos($attribute, 'trans.' . $fallbackLocale . '.')) {
98
+            if (false !== strpos($attribute, 'trans.'.$fallbackLocale.'.')) {
99 99
                 return !!trim($value);
100 100
             }
101 101
 
@@ -105,13 +105,13 @@  discard block
 block discarded – undo
105 105
 
106 106
     public function register()
107 107
     {
108
-        $this->mergeConfigFrom(__DIR__ . '/../../config/chief.php', 'thinktomorrow.chief');
109
-        $this->mergeConfigFrom(__DIR__ . '/../../config/chief-settings.php', 'thinktomorrow.chief-settings');
108
+        $this->mergeConfigFrom(__DIR__.'/../../config/chief.php', 'thinktomorrow.chief');
109
+        $this->mergeConfigFrom(__DIR__.'/../../config/chief-settings.php', 'thinktomorrow.chief-settings');
110 110
 
111 111
         $this->setupEnvironmentProviders();
112 112
 
113 113
         // Manager register is globally available
114
-        $this->app->singleton(Register::class, function () {
114
+        $this->app->singleton(Register::class, function() {
115 115
             return new Register();
116 116
         });
117 117
 
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
      */
137 137
     private function setupEnvironmentProviders()
138 138
     {
139
-        if (!$this->app->environment('production') && $services = config('app.providers-' . app()->environment(), false)) {
139
+        if (!$this->app->environment('production') && $services = config('app.providers-'.app()->environment(), false)) {
140 140
             foreach ($services as $service) {
141 141
                 $this->app->register($service);
142 142
             }
Please login to merge, or discard this patch.
app/Console/CreateAdmin.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -33,22 +33,22 @@
 block discarded – undo
33 33
 
34 34
         if ($this->option('dev')) {
35 35
             $role = 'developer';
36
-        } else {
36
+        }else {
37 37
             $role = 'admin';
38 38
         }
39 39
         
40 40
         $this->createUser($firstname, $lastname, $email, $password, [$role]);
41 41
         
42
-        $this->info($firstname.' '.$lastname. ' succesfully added as admin user.');
42
+        $this->info($firstname.' '.$lastname.' succesfully added as admin user.');
43 43
     }
44 44
 
45 45
     private function settingPermissionsAndRoles()
46 46
     {
47
-        AuthorizationDefaults::permissions()->each(function ($permissionName) {
47
+        AuthorizationDefaults::permissions()->each(function($permissionName) {
48 48
             Artisan::call('chief:permission', ['name' => $permissionName]);
49 49
         });
50 50
 
51
-        AuthorizationDefaults::roles()->each(function ($defaultPermissions, $roleName) {
51
+        AuthorizationDefaults::roles()->each(function($defaultPermissions, $roleName) {
52 52
             Artisan::call('chief:role', ['name' => $roleName, '--permissions' => implode(',', $defaultPermissions)]);
53 53
         });
54 54
         
Please login to merge, or discard this patch.
app/Http/Middleware/AuthenticateSuperadmin.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
         if (!$this->auth->user() || !$this->authorize('update-squanto')) {
42 42
             if ($request->ajax()) {
43 43
                 return response('Unauthorized.', 401);
44
-            } else {
44
+            }else {
45 45
                 return redirect()->guest('admin/login');
46 46
             }
47 47
         }
Please login to merge, or discard this patch.
app/Http/Middleware/ChiefValidateInvite.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -18,18 +18,18 @@
 block discarded – undo
18 18
     public function handle($request, Closure $next)
19 19
     {
20 20
         // Verifies a valid signature and still outside expiration period
21
-        if (! $request->hasValidSignature()) {
21
+        if (!$request->hasValidSignature()) {
22 22
             return redirect()->route('invite.expired');
23 23
         }
24 24
 
25
-        if (! $invitation = Invitation::findByToken($request->token)) {
25
+        if (!$invitation = Invitation::findByToken($request->token)) {
26 26
             return redirect()->route('invite.expired');
27 27
         }
28 28
 
29 29
         if (in_array($invitation->state(), [InvitationState::ACCEPTED, InvitationState::REVOKED])) {
30 30
 
31 31
             // We allow the user to pass if the invitee is already logged in. Otherwise the invite link cannot be reused.
32
-            if (! auth()->guard('chief')->check() || ! auth()->guard('chief')->user()->is($invitation->invitee)) {
32
+            if (!auth()->guard('chief')->check() || !auth()->guard('chief')->user()->is($invitation->invitee)) {
33 33
                 return redirect()->route('invite.expired');
34 34
             }
35 35
         }
Please login to merge, or discard this patch.
app/Http/Requests/MenuRequest.php 1 patch
Spacing   +7 added lines, -7 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 ($this->request->get('trans', []) as $locale => $trans) {
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['page_id'] = 'Interne pagina';
@@ -94,8 +94,8 @@  discard block
 block discarded – undo
94 94
 
95 95
             // Check if it is a relative
96 96
             if ($this->isRelativeUrl($trans['url'])) {
97
-                $data['trans'][$locale]['url'] = '/'. trim($trans['url'], '/');
98
-            } else {
97
+                $data['trans'][$locale]['url'] = '/'.trim($trans['url'], '/');
98
+            }else {
99 99
                 $data['trans'][$locale]['url'] = Url::fromString($trans['url'])->secure()->get();
100 100
             }
101 101
 
Please login to merge, or discard this patch.
app/Http/Controllers/Back/Menu/MenuItemController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
     public function create($menutype)
19 19
     {
20 20
         $menuitem            = new MenuItem;
21
-        $menuitem->type      = MenuItem::TYPE_INTERNAL;  // Default menu type
21
+        $menuitem->type      = MenuItem::TYPE_INTERNAL; // Default menu type
22 22
         $menuitem->menu_type = $menutype;
23 23
 
24 24
         $menuitems = ChiefMenu::fromMenuItems($menuitem->menuType())->getForSelect();
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
     {
38 38
         $menu = app(CreateMenu::class)->handle($request);
39 39
 
40
-        return redirect()->route('chief.back.menus.show', $menu->menu_type)->with('messages.success', $menu->label . ' is aangemaakt');
40
+        return redirect()->route('chief.back.menus.show', $menu->menu_type)->with('messages.success', $menu->label.' is aangemaakt');
41 41
     }
42 42
 
43 43
     public function edit($id)
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
         // TODO: replace CollectionKeys logic with Page specific one. e.g. Pages::getCollectionsForSelect()
61 61
         $collections = app(Managers::class)->findByTagForSelect('page')->toArray();
62 62
 
63
-        $pages = FlatReferencePresenter::toGroupedSelectValues(Page::all()->reject(function ($page) {
63
+        $pages = FlatReferencePresenter::toGroupedSelectValues(Page::all()->reject(function($page) {
64 64
             return $page->hidden_in_menu == true;
65 65
         }))->toArray();
66 66
 
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
     {
78 78
         $menu = app(UpdateMenu::class)->handle($id, $request);
79 79
 
80
-        return redirect()->route('chief.back.menus.show', $menu->menu_type)->with('messages.success', $menu->label . ' is aangepast');
80
+        return redirect()->route('chief.back.menus.show', $menu->menu_type)->with('messages.success', $menu->label.' is aangepast');
81 81
     }
82 82
 
83 83
     public function destroy($id)
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
             $message = 'Het item werd verwijderd.';
89 89
 
90 90
             return redirect()->route('chief.back.menus.show', $menuItem->menuType())->with('messages.warning', $message);
91
-        } else {
91
+        }else {
92 92
             return redirect()->back()->with('messages.warning', 'Je menu item is niet verwijderd. Probeer opnieuw');
93 93
         }
94 94
     }
Please login to merge, or discard this patch.