Passed
Push — dependabot/npm_and_yarn/tunnel... ( bf55bc...2f2e82 )
by Philippe
70:41 queued 28:18
created
database/migrations/2018_07_28_000000_create_settings_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 {
9 9
     public function up()
10 10
     {
11
-        Schema::create('settings', function (Blueprint $table) {
11
+        Schema::create('settings', function(Blueprint $table) {
12 12
             $table->increments('id');
13 13
             $table->string('key')->index();
14 14
             $table->text('value');
Please login to merge, or discard this patch.
database/migrations/2018_05_14_205403_create_invitations_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 {
9 9
     public function up()
10 10
     {
11
-        Schema::create('invitations', function (Blueprint $table) {
11
+        Schema::create('invitations', function(Blueprint $table) {
12 12
             $table->increments('id');
13 13
             $table->unsignedInteger('invitee_id');
14 14
             $table->unsignedInteger('inviter_id');
Please login to merge, or discard this patch.
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.