Completed
Push — master ( deb819...6a78f1 )
by Takafumi
04:41
created
src/Console/InstallCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
         try {
67 67
             foreach ($migrations as $migration) {
68 68
                 $fullPath = $this->createBaseMigration($migration);
69
-                $this->files->put($fullPath, $this->files->get(__DIR__ . "/stubs/{$migration}.stub"));
69
+                $this->files->put($fullPath, $this->files->get(__DIR__."/stubs/{$migration}.stub"));
70 70
             }
71 71
             $this->composer->dumpAutoloads();
72 72
         } catch (FileNotFoundException $exception) {
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
      */
91 91
     protected function createAdminUser()
92 92
     {
93
-        if (! is_dir($directory = app_path('Admin'))) {
93
+        if (!is_dir($directory = app_path('Admin'))) {
94 94
             mkdir($directory, 0755, true);
95 95
         }
96 96
 
Please login to merge, or discard this patch.
src/Http/Controllers/Controller.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
     public function show(int $id)
107 107
     {
108 108
         $model = $this->model::findOrFail($id);
109
-        $commentColumns = array_filter($this->getColumnsFromTable($model->comments()->getRelated()), function ($type, $name) use ($model) {
109
+        $commentColumns = array_filter($this->getColumnsFromTable($model->comments()->getRelated()), function($type, $name) use ($model) {
110 110
             return !in_array($name, ['id', 'updated_at', $model->comments()->getForeignKeyName(), $model->comments()->getMorphType()]);
111 111
         }, ARRAY_FILTER_USE_BOTH);
112 112
 
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
      */
154 154
     public function create(Request $request)
155 155
     {
156
-        $inputs = $this->validate ? $request->validate($this->validate) : array_filter($request->post(), function ($item) {
156
+        $inputs = $this->validate ? $request->validate($this->validate) : array_filter($request->post(), function($item) {
157 157
             return $item !== null;
158 158
         });
159 159
         if (isset($inputs['password'])) {
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
     public function update(Request $request, int $id)
211 211
     {
212 212
         $model = $this->model::findOrFail($id);
213
-        $inputs = $this->validate ? $request->validate($this->validate) : array_filter($request->post(), function ($item) {
213
+        $inputs = $this->validate ? $request->validate($this->validate) : array_filter($request->post(), function($item) {
214 214
             return $item !== null;
215 215
         });
216 216
         if (isset($inputs['password'])) {
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
 
288 288
         try {
289 289
             $methods = (new ReflectionClass($model))->getMethods(ReflectionMethod::IS_PUBLIC);
290
-            foreach($methods as $method) {
290
+            foreach ($methods as $method) {
291 291
                 if (
292 292
                     $method->class != get_class($model) ||
293 293
                     !empty($method->getParameters()) ||
@@ -372,8 +372,8 @@  discard block
 block discarded – undo
372 372
      */
373 373
     protected function getInputsWithFiles($request, $inputs)
374 374
     {
375
-        if (! empty($this->files)) {
376
-            $files = array_filter($inputs, function ($item, $key) {
375
+        if (!empty($this->files)) {
376
+            $files = array_filter($inputs, function($item, $key) {
377 377
                 return in_array($key, $this->files) && $item instanceof UploadedFile;
378 378
             }, ARRAY_FILTER_USE_BOTH);
379 379
 
Please login to merge, or discard this patch.
src/ServiceProvider.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
         ];
39 39
 
40 40
         if (is_dir($directory = app_path('Admin'))) {
41
-            $this->getRouter()->group($routeConfig, function ($router) {
41
+            $this->getRouter()->group($routeConfig, function($router) {
42 42
                 /** @var $router \Illuminate\Routing\Router */
43 43
                 $files = $this->getFilesystem()->allFiles(app_path('Admin'));
44 44
 
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
             ]);
120 120
         });
121 121
 
122
-        \Illuminate\Database\Eloquent\Builder::macro('comments', function () {
122
+        \Illuminate\Database\Eloquent\Builder::macro('comments', function() {
123 123
             return $this->getModel()->morphMany(LaractiveAdminComment::class, 'commentable');
124 124
         });
125 125
     }
@@ -157,16 +157,16 @@  discard block
 block discarded – undo
157 157
         $this->getRouter()->aliasMiddleware('laractive-admin', LaractiveAdminAuthenticate::class);
158 158
         $this->getRouter()->aliasMiddleware('httpauth', HttpauthAuthenticate::class);
159 159
 
160
-        $this->app->singleton('command.laractive-admin.install', function ($app) {
160
+        $this->app->singleton('command.laractive-admin.install', function($app) {
161 161
             return new InstallCommand($app['files'], $app['composer']);
162 162
         });
163
-        $this->app->singleton('command.laractive-admin.uninstall', function ($app) {
163
+        $this->app->singleton('command.laractive-admin.uninstall', function($app) {
164 164
             return new UninstallCommand($app['files'], $app['composer']);
165 165
         });
166
-        $this->app->singleton('command.laractive-admin.seed', function () {
166
+        $this->app->singleton('command.laractive-admin.seed', function() {
167 167
             return new SeedCommand;
168 168
         });
169
-        $this->app->singleton('httpauth', function ($app) {
169
+        $this->app->singleton('httpauth', function($app) {
170 170
             return new Httpauth($app['config']->get('laractive-admin.httpauth'));
171 171
         });
172 172
 
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
      */
181 181
     protected function configPath()
182 182
     {
183
-        return __DIR__ . '/../config/laractive-admin.php';
183
+        return __DIR__.'/../config/laractive-admin.php';
184 184
     }
185 185
 
186 186
     /**
Please login to merge, or discard this patch.