Completed
Pull Request — develop (#113)
by
unknown
04:54
created
app/Account.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -13,12 +13,12 @@
 block discarded – undo
13 13
     const ACCOUNT_ENABLE = 1;
14 14
 
15 15
     const ACCOUNT_STATUS = [
16
-        0 => [  'text' => 'accounts.disabled',
16
+        0 => ['text' => 'accounts.disabled',
17 17
                 'icon' => 'fa-ban',
18
-                'unicon' => '' ],
19
-        1 => [  'text' => 'accounts.enabled',
18
+                'unicon' => ''],
19
+        1 => ['text' => 'accounts.enabled',
20 20
                 'icon' => 'fa-globe',
21
-                'unicon' => '' ]
21
+                'unicon' => '']
22 22
     ];
23 23
 
24 24
     const SEARCH_CRITERIA = [
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
@@ -15,27 +15,27 @@
 block discarded – undo
15 15
     const USER_ENABLED = 1;
16 16
 
17 17
     const USER_STATUS = [
18
-        0 => [  'text' => 'users.disabled',
18
+        0 => ['text' => 'users.disabled',
19 19
                 'icon' => '',
20
-                'unicon' => '' ],
21
-        1 => [  'text' => 'users.enabled',
20
+                'unicon' => ''],
21
+        1 => ['text' => 'users.enabled',
22 22
                 'icon' => 'fa-check',
23
-                'unicon' => '' ]
23
+                'unicon' => '']
24 24
     ];
25 25
 
26 26
     const USER_LEVEL = [
27
-        1 => [  'text' => 'users.access.local',
27
+        1 => ['text' => 'users.access.local',
28 28
                 'icon' => 'fa-support',
29
-                'unicon' => '' ],
30
-        3 => [  'text' => 'users.access.global',
29
+                'unicon' => ''],
30
+        3 => ['text' => 'users.access.global',
31 31
                 'icon' => 'fa-globe',
32
-                'unicon' => '' ],
33
-        5 => [  'text' => 'users.access.admin',
32
+                'unicon' => ''],
33
+        5 => ['text' => 'users.access.admin',
34 34
                 'icon' => 'fa-shield',
35
-                'unicon' => '' ],
36
-        9 => [  'text' => 'users.access.super',
35
+                'unicon' => ''],
36
+        9 => ['text' => 'users.access.super',
37 37
                 'icon' => 'fa-rocket',
38
-                'unicon' => '' ],
38
+                'unicon' => ''],
39 39
     ];
40 40
 
41 41
     const SEARCH_CRITERIA = [
Please login to merge, or discard this patch.
app/Http/Controllers/HomeController.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -39,12 +39,12 @@  discard block
 block discarded – undo
39 39
 
40 40
     private function accountSummary()
41 41
     {
42
-        $list = [ 'total' => 0, 'summary' => []];
42
+        $list = ['total' => 0, 'summary' => []];
43 43
         $categories = Category::orderBy('name', 'asc')->get();
44 44
         foreach ($categories as $category) {
45 45
             $count = Account::where('category_id', $category->id)->count();
46 46
             if ($count) {
47
-                $list['summary'][]= [
47
+                $list['summary'][] = [
48 48
                     'count' => $count,
49 49
                     'text' => $category->name
50 50
                 ];
@@ -56,11 +56,11 @@  discard block
 block discarded – undo
56 56
 
57 57
     private function groupSummary()
58 58
     {
59
-        $list = [ 'total' => 0, 'summary' => []];
59
+        $list = ['total' => 0, 'summary' => []];
60 60
         $groups = Group::orderBy('name', 'asc')->get();
61 61
         foreach ($groups as $group) {
62 62
             $count = Account::where('group_id', $group->id)->count();
63
-            $list['summary'][]= [
63
+            $list['summary'][] = [
64 64
                 'count' => $count,
65 65
                 'text' => $group->name
66 66
             ];
@@ -71,12 +71,12 @@  discard block
 block discarded – undo
71 71
 
72 72
     private function listSummary()
73 73
     {
74
-        $list = [ 'total' => 0, 'summary' => [] ];
75
-        $types = [ 'domain', 'url' ];
74
+        $list = ['total' => 0, 'summary' => []];
75
+        $types = ['domain', 'url'];
76 76
         foreach ($types as $type) {
77 77
             $count = ProxyListItem::where('type', $type)->count();
78 78
             if ($count) {
79
-                $list['summary'][]= [
79
+                $list['summary'][] = [
80 80
                     'count' => $count,
81 81
                     'text' => "{$type}s"
82 82
                 ];
@@ -88,11 +88,11 @@  discard block
 block discarded – undo
88 88
 
89 89
     private function userSummary()
90 90
     {
91
-        $list = [ 'total' => 0, 'summary' => []];
91
+        $list = ['total' => 0, 'summary' => []];
92 92
         foreach (User::USER_LEVEL as $id => $level) {
93 93
             $count = User::where('level', $id)->count();
94 94
             if ($count) {
95
-                $list['summary'][]= [
95
+                $list['summary'][] = [
96 96
                     'count' => $count,
97 97
                     'text' => $level['text']
98 98
                 ];
Please login to merge, or discard this patch.
app/Console/Commands/ExportCategories.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
              return;
46 46
          }
47 47
 
48
-         foreach ($categories as $category){
48
+         foreach ($categories as $category) {
49 49
              $accounts = $this->fecthAccounts(['category_id' => $category->id]);
50 50
 
51 51
              $name = normalise($category->name);
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 
56 56
              try {
57 57
                  $url = $this->exportToLocation($filename);
58
-             } catch(\Exception $e) {
58
+             } catch (\Exception $e) {
59 59
                  $this->error('Export cancelled by user!');
60 60
                  return;
61 61
              }
Please login to merge, or discard this patch.
app/Console/Commands/ExportWhitelists.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
     public function handle()
40 40
     {
41 41
         $whitelist = empty($this->option('blacklist'));
42
-        if ( false === empty($this->option('list'))) {
42
+        if (false === empty($this->option('list'))) {
43 43
             $this->exportProxyList($this->option('list'), $whitelist);
44 44
         } else {
45 45
             $this->exportProxyList('domain', $whitelist);
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 
84 84
         try {
85 85
             $url = $this->exportToLocation($filename);
86
-        } catch(\Exception $e) {
86
+        } catch (\Exception $e) {
87 87
             $this->error('Export cancelled by user!');
88 88
             return;
89 89
         }
Please login to merge, or discard this patch.
app/Console/Commands/ExportGroups.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
              return;
46 46
          }
47 47
 
48
-         foreach ($groups as $group){
48
+         foreach ($groups as $group) {
49 49
             $accounts = $this->fecthAccounts(['group_id' => $group->id]);
50 50
 
51 51
              $name = normalise($group->name);
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 
56 56
              try {
57 57
                  $url = $this->exportToLocation($filename);
58
-             } catch(\Exception $e) {
58
+             } catch (\Exception $e) {
59 59
                  $this->error('Export cancelled by user!');
60 60
                  return;
61 61
              }
Please login to merge, or discard this patch.
app/Console/Commands/AbstractExportCommand.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -124,11 +124,11 @@  discard block
 block discarded – undo
124 124
      *
125 125
      * @return App\Account
126 126
      */
127
-    final protected function fecthAccounts($filter=null)
127
+    final protected function fecthAccounts($filter = null)
128 128
     {
129 129
         $query = Account::where('status', Account::ACCOUNT_ENABLE);
130 130
 
131
-        if(is_null($filter) === false && is_array($filter)) {
131
+        if (is_null($filter) === false && is_array($filter)) {
132 132
           $query = $query->where($filter);
133 133
         }
134 134
 
@@ -139,12 +139,12 @@  discard block
 block discarded – undo
139 139
     {
140 140
         $source = $this->storage->path($filename);
141 141
 
142
-        if($this->argument('output')) {
143
-            $target = $this->argument('output') . '/' . $filename;
142
+        if ($this->argument('output')) {
143
+            $target = $this->argument('output').'/'.$filename;
144 144
 
145 145
             $fs = new Filesystem(new Local('/'));
146 146
 
147
-            if ($fs->has($target) ) {
147
+            if ($fs->has($target)) {
148 148
                 if ($this->option('ci')) {
149 149
                     $fs->delete($target);
150 150
                 } else {
Please login to merge, or discard this patch.
app/Console/Commands/ExportAccounts.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
 
56 56
         try {
57 57
             $url = $this->exportToLocation($filename);
58
-        } catch(\Exception $e) {
58
+        } catch (\Exception $e) {
59 59
             $this->error('Export cancelled by user!');
60 60
             return;
61 61
         }
Please login to merge, or discard this patch.