Completed
Pull Request — develop (#79)
by
unknown
04:15
created
app/Console/Commands/ExportCategories.php 1 patch
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -40,31 +40,31 @@
 block discarded – undo
40 40
      *
41 41
      * @return mixed
42 42
      */
43
-     public function handle()
44
-     {
45
-         $categories = Category::get();
43
+        public function handle()
44
+        {
45
+            $categories = Category::get();
46 46
 
47
-         if ($categories->isEmpty()) {
48
-             $this->info("No categories to export");
49
-             return;
50
-         }
47
+            if ($categories->isEmpty()) {
48
+                $this->info("No categories to export");
49
+                return;
50
+            }
51 51
 
52
-         foreach ($categories as $category){
53
-             $name = static::stringNormalise($category->name);
54
-             $filename = 'export/categories/' . $name . '.txt';
55
-             $accounts = Account::where('status', 1)
52
+            foreach ($categories as $category){
53
+                $name = static::stringNormalise($category->name);
54
+                $filename = 'export/categories/' . $name . '.txt';
55
+                $accounts = Account::where('status', 1)
56 56
                             ->where('category_id', $category->id)
57 57
                             ->orderBy('netlogin', 'desc')
58 58
                             ->get();
59
-             Storage::put($filename, '');
60
-             $count = count($accounts);
61
-             $bar = $this->output->createProgressBar($count);
62
-             foreach ($accounts as $account) {
63
-                 Storage::prepend($filename, "{$account->netlogin}:{$account->netpass}");
64
-                 $bar->advance();
65
-             }
66
-             $bar->finish();
67
-             $this->info("\n{$count} accounts '{$category->name}' exported into file 'storage/app/{$filename}'");
68
-         }
69
-     }
59
+                Storage::put($filename, '');
60
+                $count = count($accounts);
61
+                $bar = $this->output->createProgressBar($count);
62
+                foreach ($accounts as $account) {
63
+                    Storage::prepend($filename, "{$account->netlogin}:{$account->netpass}");
64
+                    $bar->advance();
65
+                }
66
+                $bar->finish();
67
+                $this->info("\n{$count} accounts '{$category->name}' exported into file 'storage/app/{$filename}'");
68
+            }
69
+        }
70 70
 }
Please login to merge, or discard this patch.
app/Console/Commands/ExportGroups.php 1 patch
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -40,31 +40,31 @@
 block discarded – undo
40 40
      *
41 41
      * @return mixed
42 42
      */
43
-     public function handle()
44
-     {
45
-         $groups = Group::get();
43
+        public function handle()
44
+        {
45
+            $groups = Group::get();
46 46
 
47
-         if ($groups->isEmpty()) {
48
-             $this->info("No groups to export");
49
-             return;
50
-         }
47
+            if ($groups->isEmpty()) {
48
+                $this->info("No groups to export");
49
+                return;
50
+            }
51 51
 
52
-         foreach ($groups as $group){
53
-             $name = static::stringNormalise($group->name);
54
-             $filename = 'export/groups/' . $name . '.txt';
55
-             $accounts = Account::where('status', 1)
52
+            foreach ($groups as $group){
53
+                $name = static::stringNormalise($group->name);
54
+                $filename = 'export/groups/' . $name . '.txt';
55
+                $accounts = Account::where('status', 1)
56 56
                             ->where('group_id', $group->id)
57 57
                             ->orderBy('netlogin', 'desc')
58 58
                             ->get();
59
-             Storage::put($filename, '');
60
-             $count = count($accounts);
61
-             $bar = $this->output->createProgressBar($count);
62
-             foreach ($accounts as $account) {
63
-                 Storage::prepend($filename, "{$account->netlogin}:{$account->netpass}");
64
-                 $bar->advance();
65
-             }
66
-             $bar->finish();
67
-             $this->info("\n{$count} accounts '{$group->name}' exported into file 'storage/app/{$filename}'");
68
-         }
69
-     }
59
+                Storage::put($filename, '');
60
+                $count = count($accounts);
61
+                $bar = $this->output->createProgressBar($count);
62
+                foreach ($accounts as $account) {
63
+                    Storage::prepend($filename, "{$account->netlogin}:{$account->netpass}");
64
+                    $bar->advance();
65
+                }
66
+                $bar->finish();
67
+                $this->info("\n{$count} accounts '{$group->name}' exported into file 'storage/app/{$filename}'");
68
+            }
69
+        }
70 70
 }
Please login to merge, or discard this patch.
app/Http/Helpers/Installer/PermissionsChecker.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,8 +34,7 @@
 block discarded – undo
34 34
             if(!($this->getPermission($folder) >= $permission))
35 35
             {
36 36
                 $this->addFileAndSetErrors($folder, $permission, false);
37
-            }
38
-            else {
37
+            } else {
39 38
                 $this->addFile($folder, $permission, true);
40 39
             }
41 40
         }
Please login to merge, or discard this patch.
app/Http/Helpers/Installer/DatabaseManager.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -72,8 +72,8 @@
 block discarded – undo
72 72
     }
73 73
 
74 74
         /**
75
-     * check database type. If SQLite, then create the database file.
76
-     */
75
+         * check database type. If SQLite, then create the database file.
76
+         */
77 77
     private function sqlite()
78 78
     {
79 79
         if(DB::connection() instanceof SQLiteConnection) {
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -31,8 +31,7 @@  discard block
 block discarded – undo
31 31
     {
32 32
         try{
33 33
             Artisan::call('migrate', ["--force"=> true ]);
34
-        }
35
-        catch(Exception $e){
34
+        } catch(Exception $e){
36 35
             return $this->response($e->getMessage());
37 36
         }
38 37
 
@@ -48,8 +47,7 @@  discard block
 block discarded – undo
48 47
     {
49 48
         try{
50 49
             Artisan::call('db:seed');
51
-        }
52
-        catch(Exception $e){
50
+        } catch(Exception $e){
53 51
             return $this->response($e->getMessage());
54 52
         }
55 53
 
Please login to merge, or discard this patch.
app/Http/Controllers/InstallerController.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -212,7 +212,7 @@
 block discarded – undo
212 212
         $response = $databaseManager->migrateAndSeed();
213 213
 
214 214
         return redirect()->route('KleisInstaller::stepFinal')
215
-                         ->with(['message' => $response]);
215
+                            ->with(['message' => $response]);
216 216
     }
217 217
 
218 218
     /**
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -135,7 +135,7 @@
 block discarded – undo
135 135
             $mdfile = public_path("markdown/{$filename}");
136 136
             try {
137 137
                 file_put_contents($mdfile, $request->announce);
138
-            }  catch(Exception $e) {
138
+            } catch(Exception $e) {
139 139
                 return $redirect->route('KleisInstaller::stepCustomization')
140 140
                                 ->withInput();
141 141
             }
Please login to merge, or discard this patch.
app/Http/ViewComposers/LegalNoticeComposer.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
             }
28 28
         }
29 29
         $view->with('enable', $enable)
30
-             ->with('title', $title)
31
-             ->with('contents', $contents);
30
+                ->with('title', $title)
31
+                ->with('contents', $contents);
32 32
     }
33 33
 }
Please login to merge, or discard this patch.