Completed
Pull Request — master (#4)
by
unknown
09:35
created
src/ServiceProvider.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
         ];
40 40
 
41 41
         if (is_dir($directory = app_path('Admin'))) {
42
-            $this->getRouter()->group($routeConfig, function ($router) {
42
+            $this->getRouter()->group($routeConfig, function($router) {
43 43
                 /** @var $router \Illuminate\Routing\Router */
44 44
                 $files = $this->getFilesystem()->allFiles(app_path('Admin'));
45 45
 
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
         $this->getRouter()->group([
107 107
             'middleware' => ['web', 'httpauth'],
108 108
             'prefix' => $this->app['config']->get('laractive-admin.route_prefix'),
109
-        ], function ($router) {
109
+        ], function($router) {
110 110
             /* @var $router \Illuminate\Routing\Router */
111 111
             $router->get('login', [
112 112
                 'uses' => '\Enomotodev\LaractiveAdmin\Http\Controllers\Auth\LoginController@showLoginForm',
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
             ]);
122 122
         });
123 123
 
124
-        \Illuminate\Database\Eloquent\Builder::macro('comments', function () {
124
+        \Illuminate\Database\Eloquent\Builder::macro('comments', function() {
125 125
             return $this->getModel()->morphMany(LaractiveAdminComment::class, 'commentable');
126 126
         });
127 127
     }
@@ -160,16 +160,16 @@  discard block
 block discarded – undo
160 160
         $this->getRouter()->aliasMiddleware('httpauth', HttpauthAuthenticate::class);
161 161
         $this->getRouter()->aliasMiddleware('sharing-data', SharingDataWithAllViews::class);
162 162
 
163
-        $this->app->singleton('command.laractive-admin.install', function ($app) {
163
+        $this->app->singleton('command.laractive-admin.install', function($app) {
164 164
             return new InstallCommand($app['files'], $app['composer']);
165 165
         });
166
-        $this->app->singleton('command.laractive-admin.uninstall', function ($app) {
166
+        $this->app->singleton('command.laractive-admin.uninstall', function($app) {
167 167
             return new UninstallCommand($app['files'], $app['composer']);
168 168
         });
169
-        $this->app->singleton('command.laractive-admin.seed', function () {
169
+        $this->app->singleton('command.laractive-admin.seed', function() {
170 170
             return new SeedCommand;
171 171
         });
172
-        $this->app->singleton('httpauth', function ($app) {
172
+        $this->app->singleton('httpauth', function($app) {
173 173
             return new Httpauth($app['config']->get('laractive-admin.httpauth'));
174 174
         });
175 175
 
Please login to merge, or discard this patch.
src/Console/SeedCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
      */
33 33
     public function handle()
34 34
     {
35
-        if (! AdminUser::where('email', '[email protected]')->first()) {
35
+        if (!AdminUser::where('email', '[email protected]')->first()) {
36 36
             AdminUser::create([
37 37
                 'email' => self::ADMIN_USER_EMAIL,
38 38
                 'password' => \Hash::make(self::ADMIN_USER_PASSWORD),
Please login to merge, or discard this patch.
src/Console/InstallCommand.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
      */
92 92
     protected function createAdminUser()
93 93
     {
94
-        if (! is_dir($directory = app_path('Admin'))) {
94
+        if (!is_dir($directory = app_path('Admin'))) {
95 95
             mkdir($directory, 0755, true);
96 96
         }
97 97
 
@@ -103,13 +103,13 @@  discard block
 block discarded – undo
103 103
      */
104 104
     protected function createDashboard()
105 105
     {
106
-        if (! is_dir($directory = app_path('Admin'))) {
106
+        if (!is_dir($directory = app_path('Admin'))) {
107 107
             mkdir($directory, 0755, true);
108 108
         }
109 109
 
110 110
         copy(__DIR__.'/stubs/Dashboard.stub', "{$directory}/Dashboard.php");
111 111
 
112
-        if (! is_dir($directory = resource_path('views/admin'))) {
112
+        if (!is_dir($directory = resource_path('views/admin'))) {
113 113
             mkdir($directory, 0755, true);
114 114
         }
115 115
 
Please login to merge, or discard this patch.
src/Http/Controllers/Controller.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
 
173 173
             if (! empty($inputs[$key])) {
174 174
                 $filter_inputs = array_filter($inputs[$key], function ($item) {
175
-                   return !empty($item);
175
+                    return !empty($item);
176 176
                 });
177 177
                 $model->{$relation['relation_name']}()->sync($filter_inputs);
178 178
             }
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
 
231 231
             if (! empty($inputs[$key])) {
232 232
                 $filter_inputs = array_filter($inputs[$key], function ($item) {
233
-                   return !empty($item);
233
+                    return !empty($item);
234 234
                 });
235 235
                 $model->{$relation['relation_name']}()->sync($filter_inputs);
236 236
             }
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -114,8 +114,8 @@  discard block
 block discarded – undo
114 114
     public function show(int $id)
115 115
     {
116 116
         $model = $this->model::findOrFail($id);
117
-        $commentColumns = array_filter($this->getColumnsFromTable($model->comments()->getRelated()), function ($type, $name) use ($model) {
118
-            return ! in_array($name, ['id', 'updated_at', $model->comments()->getForeignKeyName(), $model->comments()->getMorphType()]);
117
+        $commentColumns = array_filter($this->getColumnsFromTable($model->comments()->getRelated()), function($type, $name) use ($model) {
118
+            return !in_array($name, ['id', 'updated_at', $model->comments()->getForeignKeyName(), $model->comments()->getMorphType()]);
119 119
         }, ARRAY_FILTER_USE_BOTH);
120 120
 
121 121
         return new HtmlString(
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
      */
158 158
     public function create(Request $request)
159 159
     {
160
-        $inputs = $this->validate ? $request->validate($this->validate) : array_filter($request->post(), function ($item) {
160
+        $inputs = $this->validate ? $request->validate($this->validate) : array_filter($request->post(), function($item) {
161 161
             return $item !== null;
162 162
         });
163 163
         if (isset($inputs['password'])) {
@@ -170,8 +170,8 @@  discard block
 block discarded – undo
170 170
                 continue;
171 171
             }
172 172
 
173
-            if (! empty($inputs[$key])) {
174
-                $filter_inputs = array_filter($inputs[$key], function ($item) {
173
+            if (!empty($inputs[$key])) {
174
+                $filter_inputs = array_filter($inputs[$key], function($item) {
175 175
                    return !empty($item);
176 176
                 });
177 177
                 $model->{$relation['relation_name']}()->sync($filter_inputs);
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
     public function update(Request $request, int $id)
216 216
     {
217 217
         $model = $this->model::findOrFail($id);
218
-        $inputs = $this->validate ? $request->validate($this->validate) : array_filter($request->post(), function ($item) {
218
+        $inputs = $this->validate ? $request->validate($this->validate) : array_filter($request->post(), function($item) {
219 219
             return $item !== null;
220 220
         });
221 221
         if (isset($inputs['password'])) {
@@ -228,8 +228,8 @@  discard block
 block discarded – undo
228 228
                 continue;
229 229
             }
230 230
 
231
-            if (! empty($inputs[$key])) {
232
-                $filter_inputs = array_filter($inputs[$key], function ($item) {
231
+            if (!empty($inputs[$key])) {
232
+                $filter_inputs = array_filter($inputs[$key], function($item) {
233 233
                    return !empty($item);
234 234
                 });
235 235
                 $model->{$relation['relation_name']}()->sync($filter_inputs);
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
             foreach ($methods as $method) {
311 311
                 if (
312 312
                     $method->class != get_class($model) ||
313
-                    ! empty($method->getParameters()) ||
313
+                    !empty($method->getParameters()) ||
314 314
                     $method->getName() == __FUNCTION__
315 315
                 ) {
316 316
                     continue;
@@ -380,8 +380,8 @@  discard block
 block discarded – undo
380 380
      */
381 381
     protected function getInputsWithFiles($request, $inputs)
382 382
     {
383
-        if (! empty($this->files)) {
384
-            $files = array_filter($inputs, function ($item, $key) {
383
+        if (!empty($this->files)) {
384
+            $files = array_filter($inputs, function($item, $key) {
385 385
                 return in_array($key, $this->files) && $item instanceof UploadedFile;
386 386
             }, ARRAY_FILTER_USE_BOTH);
387 387
 
Please login to merge, or discard this patch.