Passed
Push — ft/appmove ( db87fd...97613e )
by Philippe
45:05 queued 26:47
created
src/ChiefApp/Http/Controllers/Back/ModulesController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,6 +37,6 @@
 block discarded – undo
37 37
         $manager->manage($module);
38 38
 
39 39
         return redirect()->to($manager->route('edit'))
40
-            ->with('messages.success', '<i class="fa fa-fw fa-check-circle"></i>  "' . $manager->details()->title . '" is toegevoegd');
40
+            ->with('messages.success', '<i class="fa fa-fw fa-check-circle"></i>  "'.$manager->details()->title.'" is toegevoegd');
41 41
     }
42 42
 }
Please login to merge, or discard this patch.
src/ChiefApp/Http/Controllers/Auth/ResetPasswordController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
         // will update the password on an actual user model and persist it to the
63 63
         // database. Otherwise we will parse the error and return the response.
64 64
         $response = $this->broker()->reset(
65
-            $this->credentials($request), function ($user, $password) {
65
+            $this->credentials($request), function($user, $password) {
66 66
                 $this->resetPassword($user, $password);
67 67
             }
68 68
         );
Please login to merge, or discard this patch.
src/ChiefApp/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.
src/ChiefApp/routes.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@  discard block
 block discarded – undo
5 5
  * SPIRIT ROUTES
6 6
  * -----------------------------------------------------------------
7 7
  */
8
-Route::get('spirit/{section?}/{item?}', ['as' => 'spirit.index', 'uses' => function ($section = null, $item = null) {
8
+Route::get('spirit/{section?}/{item?}', ['as' => 'spirit.index', 'uses' => function($section = null, $item = null) {
9 9
     if ($section && $item && view()->exists('chief::spirit.'.$section.'.'.$item)) {
10 10
         return view('chief::spirit.'.$section.'.'.$item);
11 11
     }
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
  * NON-AUTHENTICATED ADMIN ROUTES
19 19
  * -----------------------------------------------------------------
20 20
  */
21
-Route::group(['prefix' => config('thinktomorrow.chief.route.prefix', 'admin'), 'middleware' => ['web']], function () {
21
+Route::group(['prefix' => config('thinktomorrow.chief.route.prefix', 'admin'), 'middleware' => ['web']], function() {
22 22
     Route::get('login', 'Thinktomorrow\Chief\App\Http\Controllers\Auth\LoginController@showLoginForm')->name('chief.back.login')->middleware('web');
23 23
     Route::post('login', 'Thinktomorrow\Chief\App\Http\Controllers\Auth\LoginController@login')->name('chief.back.login.store')->middleware('web');
24 24
 
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
  * ADMIN ROUTES
40 40
  * -----------------------------------------------------------------
41 41
  */
42
-Route::group(['prefix' => config('thinktomorrow.chief.route.prefix', 'admin'), 'middleware' => ['web', 'web-chief', 'auth:chief']], function () {
42
+Route::group(['prefix' => config('thinktomorrow.chief.route.prefix', 'admin'), 'middleware' => ['web', 'web-chief', 'auth:chief']], function() {
43 43
 
44 44
     // Dashboard
45 45
     Route::get('/', 'Thinktomorrow\Chief\App\Http\Controllers\Back\DashboardController@show')->name('chief.back.dashboard');
Please login to merge, or discard this patch.
src/ChiefApp/Providers/ViewServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
 
13 13
     public function boot()
14 14
     {
15
-        View::composer(['chief::back.managers._partials.archive-modal'], function ($view) {
15
+        View::composer(['chief::back.managers._partials.archive-modal'], function($view) {
16 16
             $viewData = $view->getData();
17 17
 
18 18
             $ignoredModel = (isset($viewData['manager']))
Please login to merge, or discard this patch.
src/ChiefApp/Providers/AuthServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
     {
18 18
         $this->registerPolicies();
19 19
 
20
-        Auth::provider('chief-eloquent', function ($app, array $config) {
20
+        Auth::provider('chief-eloquent', function($app, array $config) {
21 21
             return new ChiefUserProvider($app['hash'], $config['model']);
22 22
         });
23 23
     }
Please login to merge, or discard this patch.
src/ChiefApp/Providers/ChiefServiceProvider.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -188,8 +188,8 @@
 block discarded – undo
188 188
             Route::get('{slug?}', function ($slug = '/') use ($routeName) {
189 189
                 return ChiefResponse::fromSlug($slug);
190 190
             })->name($routeName)
191
-              ->where('slug', '(.*)?')
192
-              ->middleware('web');
191
+                ->where('slug', '(.*)?')
192
+                ->middleware('web');
193 193
         });
194 194
     }
195 195
 
Please login to merge, or discard this patch.
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -32,8 +32,8 @@  discard block
 block discarded – undo
32 32
     {
33 33
         $this->registerChiefGuard();
34 34
 
35
-        $this->app['view']->addNamespace('squanto', __DIR__ . '/../../../resources/views/vendor/squanto');
36
-        $this->app['view']->addNamespace('squanto', base_path() . '/resources/views/vendor/thinktomorrow/chief/vendor/squanto');
35
+        $this->app['view']->addNamespace('squanto', __DIR__.'/../../../resources/views/vendor/squanto');
36
+        $this->app['view']->addNamespace('squanto', base_path().'/resources/views/vendor/thinktomorrow/chief/vendor/squanto');
37 37
 
38 38
         (new MacrosServiceProvider($this->app))->boot();
39 39
         (new AuthServiceProvider($this->app))->boot();
@@ -48,18 +48,18 @@  discard block
 block discarded – undo
48 48
         // Project defaults
49 49
         (new ChiefProjectServiceProvider($this->app))->boot();
50 50
 
51
-        $this->loadRoutesFrom(__DIR__ . '/../routes.php');
52
-        $this->loadViewsFrom(__DIR__ . '/../../../resources/views', 'chief');
53
-        $this->loadMigrationsFrom(__DIR__ . '/../../../database/migrations');
54
-        $this->loadTranslationsFrom(__DIR__ . '/../../../resources/lang', 'chief');
51
+        $this->loadRoutesFrom(__DIR__.'/../routes.php');
52
+        $this->loadViewsFrom(__DIR__.'/../../../resources/views', 'chief');
53
+        $this->loadMigrationsFrom(__DIR__.'/../../../database/migrations');
54
+        $this->loadTranslationsFrom(__DIR__.'/../../../resources/lang', 'chief');
55 55
 
56 56
         $this->publishes([
57
-            __DIR__ . '/../../../config/chief.php' => config_path('thinktomorrow/chief.php'),
58
-            __DIR__ . '/../../../config/chief-settings.php' => config_path('thinktomorrow/chief-settings.php'),
57
+            __DIR__.'/../../../config/chief.php' => config_path('thinktomorrow/chief.php'),
58
+            __DIR__.'/../../../config/chief-settings.php' => config_path('thinktomorrow/chief-settings.php'),
59 59
         ], 'chief-config');
60 60
 
61 61
         $this->publishes([
62
-            __DIR__ . '/../../../public/chief-assets' => public_path('/chief-assets'),
62
+            __DIR__.'/../../../public/chief-assets' => public_path('/chief-assets'),
63 63
         ], 'chief-assets');
64 64
 
65 65
         // Register commands
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
             $this->app->bind('command.chief:role', GenerateRoleCommand::class);
85 85
             $this->app->bind('command.chief:admin', CreateAdmin::class);
86 86
             $this->app->bind('command.chief:developer', CreateDeveloper::class);
87
-            $this->app->bind('command.chief:page', function ($app) {
87
+            $this->app->bind('command.chief:page', function($app) {
88 88
                 return new GeneratePage($app['files'], [
89 89
                     'base_path' => base_path()
90 90
                 ]);
@@ -96,10 +96,10 @@  discard block
 block discarded – undo
96 96
 
97 97
         // Custom validator for requiring on translations only the fallback locale
98 98
         // this is called in the validation as required-fallback-locale
99
-        Validator::extendImplicit('requiredFallbackLocale', function ($attribute, $value, $parameters, $validator) {
99
+        Validator::extendImplicit('requiredFallbackLocale', function($attribute, $value, $parameters, $validator) {
100 100
             $fallbackLocale = config('app.fallback_locale');
101 101
 
102
-            if (false !== strpos($attribute, 'trans.' . $fallbackLocale . '.')) {
102
+            if (false !== strpos($attribute, 'trans.'.$fallbackLocale.'.')) {
103 103
                 return !!trim($value);
104 104
             }
105 105
 
@@ -112,13 +112,13 @@  discard block
 block discarded – undo
112 112
 
113 113
     public function register()
114 114
     {
115
-        $this->mergeConfigFrom(__DIR__ . '/../../../config/chief.php', 'thinktomorrow.chief');
116
-        $this->mergeConfigFrom(__DIR__ . '/../../../config/chief-settings.php', 'thinktomorrow.chief-settings');
115
+        $this->mergeConfigFrom(__DIR__.'/../../../config/chief.php', 'thinktomorrow.chief');
116
+        $this->mergeConfigFrom(__DIR__.'/../../../config/chief-settings.php', 'thinktomorrow.chief-settings');
117 117
 
118 118
         $this->setupEnvironmentProviders();
119 119
 
120 120
         // Manager register is globally available
121
-        $this->app->singleton(Register::class, function () {
121
+        $this->app->singleton(Register::class, function() {
122 122
             return new Register();
123 123
         });
124 124
 
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
      */
145 145
     private function setupEnvironmentProviders()
146 146
     {
147
-        if (!$this->app->environment('production') && $services = config('app.providers-' . app()->environment(), false)) {
147
+        if (!$this->app->environment('production') && $services = config('app.providers-'.app()->environment(), false)) {
148 148
             foreach ($services as $service) {
149 149
                 $this->app->register($service);
150 150
             }
@@ -182,10 +182,10 @@  discard block
 block discarded – undo
182 182
             return;
183 183
         }
184 184
 
185
-        app()->booted(function () {
185
+        app()->booted(function() {
186 186
             $routeName = config('thinktomorrow.chief.route.name');
187 187
 
188
-            Route::get('{slug?}', function ($slug = '/') use ($routeName) {
188
+            Route::get('{slug?}', function($slug = '/') use ($routeName) {
189 189
                 return ChiefResponse::fromSlug($slug);
190 190
             })->name($routeName)
191 191
               ->where('slug', '(.*)?')
Please login to merge, or discard this patch.
src/ChiefApp/Console/RefreshDatabase.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 
33 33
         if ($this->option('force')) {
34 34
             $this->call('migrate:fresh', ['--force' => true]);
35
-        } else {
35
+        }else {
36 36
             $this->call('migrate:fresh');
37 37
         }
38 38
 
@@ -48,11 +48,11 @@  discard block
 block discarded – undo
48 48
 
49 49
     private function settingPermissionsAndRoles()
50 50
     {
51
-        AuthorizationDefaults::permissions()->each(function ($permissionName) {
51
+        AuthorizationDefaults::permissions()->each(function($permissionName) {
52 52
             Artisan::call('chief:permission', ['name' => $permissionName]);
53 53
         });
54 54
 
55
-        AuthorizationDefaults::roles()->each(function ($defaultPermissions, $roleName) {
55
+        AuthorizationDefaults::roles()->each(function($defaultPermissions, $roleName) {
56 56
             Artisan::call('chief:role', ['name' => $roleName, '--permissions' => implode(',', $defaultPermissions)]);
57 57
         });
58 58
 
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
             ['Json', 'Voorhees', '[email protected]', $password],
78 78
         ]);
79 79
 
80
-        $admins->each(function ($admin) {
80
+        $admins->each(function($admin) {
81 81
             $this->createUser($admin[0], $admin[1], $admin[2], $admin[3], 'developer');
82 82
             $this->info('Added '.$admin[0].' as developer role with your provided password.');
83 83
         });
Please login to merge, or discard this patch.
src/ChiefApp/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.