Completed
Branch develop (a455fd)
by Greg
16:10
created
app/Console/Commands/ExportCategories.php 2 patches
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.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,9 +49,9 @@
 block discarded – undo
49 49
              return;
50 50
          }
51 51
 
52
-         foreach ($categories as $category){
52
+         foreach ($categories as $category) {
53 53
              $name = static::stringNormalise($category->name);
54
-             $filename = 'export/categories/' . $name . '.txt';
54
+             $filename = 'export/categories/'.$name.'.txt';
55 55
              $accounts = Account::where('status', 1)
56 56
                             ->where('category_id', $category->id)
57 57
                             ->orderBy('netlogin', 'desc')
Please login to merge, or discard this patch.
app/Console/Commands/ExportGroups.php 2 patches
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.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,9 +49,9 @@
 block discarded – undo
49 49
              return;
50 50
          }
51 51
 
52
-         foreach ($groups as $group){
52
+         foreach ($groups as $group) {
53 53
              $name = static::stringNormalise($group->name);
54
-             $filename = 'export/groups/' . $name . '.txt';
54
+             $filename = 'export/groups/'.$name.'.txt';
55 55
              $accounts = Account::where('status', 1)
56 56
                             ->where('group_id', $group->id)
57 57
                             ->orderBy('netlogin', 'desc')
Please login to merge, or discard this patch.
app/User.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -7,27 +7,27 @@
 block discarded – undo
7 7
 class User extends Authenticatable
8 8
 {
9 9
     const USER_STATUS = [
10
-        0 => [  'text' => 'users.disabled',
10
+        0 => ['text' => 'users.disabled',
11 11
                 'icon' => '',
12
-                'unicon' => '' ],
13
-        1 => [  'text' => 'users.enabled',
12
+                'unicon' => ''],
13
+        1 => ['text' => 'users.enabled',
14 14
                 'icon' => 'fa-check',
15
-                'unicon' => '' ]
15
+                'unicon' => '']
16 16
     ];
17 17
 
18 18
     const USER_LEVEL = [
19
-        1 => [  'text' => 'users.access.local',
19
+        1 => ['text' => 'users.access.local',
20 20
                 'icon' => 'fa-support',
21
-                'unicon' => '' ],
22
-        3 => [  'text' => 'users.access.global',
21
+                'unicon' => ''],
22
+        3 => ['text' => 'users.access.global',
23 23
                 'icon' => 'fa-globe',
24
-                'unicon' => '' ],
25
-        5 => [  'text' => 'users.access.admin',
24
+                'unicon' => ''],
25
+        5 => ['text' => 'users.access.admin',
26 26
                 'icon' => 'fa-shield',
27
-                'unicon' => '' ],
28
-        9 => [  'text' => 'users.access.super',
27
+                'unicon' => ''],
28
+        9 => ['text' => 'users.access.super',
29 29
                 'icon' => 'fa-rocket',
30
-                'unicon' => '' ],
30
+                'unicon' => ''],
31 31
     ];
32 32
 
33 33
     const SEARCH_CRITERIA = [
Please login to merge, or discard this patch.
app/Http/routes.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,9 +11,9 @@
 block discarded – undo
11 11
 |
12 12
 */
13 13
 
14
-Route::group(['middleware' => 'installed'], function () {
14
+Route::group(['middleware' => 'installed'], function() {
15 15
 
16
-    Route::get('/', function () {
16
+    Route::get('/', function() {
17 17
         return view('welcome');
18 18
     });
19 19
 
Please login to merge, or discard this patch.
app/Http/ViewComposers/LegalNoticeComposer.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,8 +19,8 @@
 block discarded – undo
19 19
         if (file_exists($mdfile)){
20 20
             list($title, $contents) = explode(PHP_EOL, file_get_contents($mdfile), 2);
21 21
             $view->with('enable', true)
22
-                 ->with('title', $title)
23
-                 ->with('contents', Markdown::convertToHtml($contents));
22
+                    ->with('title', $title)
23
+                    ->with('contents', Markdown::convertToHtml($contents));
24 24
         } else {
25 25
             $view->with('enable', false);
26 26
         }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
     public function compose(View $view)
17 17
     {
18 18
         $mdfile = public_path('markdown/legal/'.config('kleis.legal_notice').'-'.config('app.locale').'.md');
19
-        if (file_exists($mdfile)){
19
+        if (file_exists($mdfile)) {
20 20
             list($title, $contents) = explode(PHP_EOL, file_get_contents($mdfile), 2);
21 21
             $view->with('enable', true)
22 22
                  ->with('title', $title)
Please login to merge, or discard this patch.
app/Http/ViewComposers/HomeComposer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
     public function compose(View $view)
17 17
     {
18 18
         $mdfile = public_path('markdown/'.config('kleis.announce'));
19
-        if (file_exists($mdfile)){
19
+        if (file_exists($mdfile)) {
20 20
             $contents = file_get_contents($mdfile);
21 21
             $view->with('announce', Markdown::convertToHtml($contents));
22 22
         } else {
Please login to merge, or discard this patch.
app/Http/Middleware/RedirectIfInstalled.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
      */
16 16
     public function handle($request, Closure $next)
17 17
     {
18
-        if($this->alreadyInstalled() || !config('kleis.installer')) {
18
+        if ($this->alreadyInstalled() || !config('kleis.installer')) {
19 19
             return redirect('/');
20 20
         }
21 21
 
Please login to merge, or discard this patch.
app/Http/Helpers/Installer/RequirementsChecker.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,11 +15,11 @@
 block discarded – undo
15 15
     {
16 16
         $results = [];
17 17
 
18
-        foreach($requirements as $requirement)
18
+        foreach ($requirements as $requirement)
19 19
         {
20 20
             $results['requirements'][$requirement] = true;
21 21
 
22
-            if(!extension_loaded($requirement))
22
+            if (!extension_loaded($requirement))
23 23
             {
24 24
                 $results['requirements'][$requirement] = false;
25 25
 
Please login to merge, or discard this patch.
app/Http/Helpers/Installer/DatabaseManager.php 3 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.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -29,10 +29,10 @@  discard block
 block discarded – undo
29 29
      */
30 30
     private function migrate()
31 31
     {
32
-        try{
33
-            Artisan::call('migrate', ["--force"=> true ]);
32
+        try {
33
+            Artisan::call('migrate', ["--force"=> true]);
34 34
         }
35
-        catch(Exception $e){
35
+        catch (Exception $e) {
36 36
             return $this->response($e->getMessage());
37 37
         }
38 38
 
@@ -46,10 +46,10 @@  discard block
 block discarded – undo
46 46
      */
47 47
     private function seed()
48 48
     {
49
-        try{
49
+        try {
50 50
             Artisan::call('db:seed');
51 51
         }
52
-        catch(Exception $e){
52
+        catch (Exception $e) {
53 53
             return $this->response($e->getMessage());
54 54
         }
55 55
 
@@ -76,9 +76,9 @@  discard block
 block discarded – undo
76 76
      */
77 77
     private function sqlite()
78 78
     {
79
-        if(DB::connection() instanceof SQLiteConnection) {
79
+        if (DB::connection() instanceof SQLiteConnection) {
80 80
             $database = DB::connection()->getDatabaseName();
81
-            if(!file_exists($database)) {
81
+            if (!file_exists($database)) {
82 82
                 touch($database);
83 83
                 DB::reconnect(Config::get('database.default'));
84 84
             }
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.