Passed
Pull Request — master (#20)
by Nikolay
04:51
created
src/Core/Workers/WorkerNotifyError.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
     private array $queue = [];
17 17
     private int $starting_point = 0;
18 18
     private int $interval = 28800;
19
-    protected int $maxProc=1;
19
+    protected int $maxProc = 1;
20 20
 
21 21
     /**
22 22
      * Наполняем очередь уведомлениями.
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
                 continue;
68 68
             }
69 69
             if (Util::isJson($text_error)) {
70
-                $data       = json_decode($text_error, true);
70
+                $data = json_decode($text_error, true);
71 71
                 $test_email .= "<hr>";
72 72
                 $test_email .= "{$section}";
73 73
                 $test_email .= "<hr>";
Please login to merge, or discard this patch.
src/AdminCabinet/Controllers/FirewallController.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -36,10 +36,10 @@  discard block
 block discarded – undo
36 36
                 $localAddresses[] = $calculator->cidr2network(
37 37
                         $interface->ipaddr,
38 38
                         $interface->subnet
39
-                    ) . '/' . $interface->subnet;
39
+                    ).'/'.$interface->subnet;
40 40
             } else {
41 41
                 $cidr             = $calculator->netmask2cidr($interface->subnet);
42
-                $localAddresses[] = $calculator->cidr2network($interface->ipaddr, $cidr) . '/' . $cidr;
42
+                $localAddresses[] = $calculator->cidr2network($interface->ipaddr, $cidr).'/'.$cidr;
43 43
             }
44 44
         }
45 45
 
@@ -57,13 +57,13 @@  discard block
 block discarded – undo
57 57
                 $networksTable[$filter->id]['network'] = $calculator->cidr2network(
58 58
                         $permitParts[0],
59 59
                         $permitParts[1]
60
-                    ) . '/' . $permitParts[1];
60
+                    ).'/'.$permitParts[1];
61 61
             } else {
62 62
                 $cidr                                  = $calculator->netmask2cidr($permitParts[1]);
63 63
                 $networksTable[$filter->id]['network'] = $calculator->cidr2network(
64 64
                         $permitParts[0],
65 65
                         $cidr
66
-                    ) . '/' . $cidr;
66
+                    ).'/'.$cidr;
67 67
             }
68 68
             $networksTable[$filter->id]['permanent'] = false;
69 69
 
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
             $firewallRules = $filter->FirewallRules;
81 81
             foreach ($firewallRules as $rule) {
82 82
                 $networksTable[$filter->id]['category'][$rule->category]['action'] = $rule->action;
83
-                if ( ! array_key_exists('name', $networksTable[$filter->id]['category'][$rule->category])) {
83
+                if (!array_key_exists('name', $networksTable[$filter->id]['category'][$rule->category])) {
84 84
                     $networksTable[$filter->id]['category'][$rule->category]['name'] = $rule->category;
85 85
                 }
86 86
             }
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
                     break;
97 97
                 }
98 98
             }
99
-            if ( ! $existsPersistentRecord) {
99
+            if (!$existsPersistentRecord) {
100 100
                 foreach ($defaultRules as $key => $value) {
101 101
                     $networksTableNewRecord['category'][$key] = [
102 102
                         'name'   => $key,
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
         }
144 144
         $permitParts = explode('/', $networkFilter->permit);
145 145
 
146
-        $this->view->form          = new FirewallEditForm(
146
+        $this->view->form = new FirewallEditForm(
147 147
             $networkFilter,
148 148
             ['network' => $permitParts[0], 'subnet' => $permitParts[1]]
149 149
         );
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
      */
158 158
     public function saveAction(): void
159 159
     {
160
-        if ( ! $this->request->isPost()) {
160
+        if (!$this->request->isPost()) {
161 161
             return;
162 162
         }
163 163
 
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
         }
172 172
 
173 173
         // Update network filters Network Filter
174
-        if ( ! $this->updateNetworkFilters($filterRecord, $data)) {
174
+        if (!$this->updateNetworkFilters($filterRecord, $data)) {
175 175
             $this->view->success = false;
176 176
             $this->db->rollback();
177 177
 
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
 
186 186
         // Update firewall rules Firewall
187 187
         $data['id'] = $filterRecord->id;
188
-        if ( ! $this->updateFirewallRules($data)) {
188
+        if (!$this->updateFirewallRules($data)) {
189 189
             $this->view->success = false;
190 190
             $this->db->rollback();
191 191
 
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
                     $filterRecord->$name = $calculator->cidr2network(
216 216
                             $data['network'],
217 217
                             $data['subnet']
218
-                        ) . '/' . $data['subnet'];
218
+                        ).'/'.$data['subnet'];
219 219
                     break;
220 220
                 case 'deny':
221 221
                     $filterRecord->$name = '0.0.0.0/0';
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
         }
265 265
 
266 266
         // Delete outdated records
267
-        $parameters        = [
267
+        $parameters = [
268 268
             'conditions' => 'networkfilterid=:networkfilterid:',
269 269
             'bind'       => [
270 270
                 'networkfilterid' => $data['id'],
@@ -298,8 +298,8 @@  discard block
 block discarded – undo
298 298
                 $newRule->portto          = $rule['portto'];
299 299
                 $newRule->category        = $key;
300 300
 
301
-                if (array_key_exists('rule_' . $key, $data) && $data['rule_' . $key]) {
302
-                    $newRule->action = $data['rule_' . $key] === 'on' ? 'allow' : 'block';
301
+                if (array_key_exists('rule_'.$key, $data) && $data['rule_'.$key]) {
302
+                    $newRule->action = $data['rule_'.$key] === 'on' ? 'allow' : 'block';
303 303
                 } else {
304 304
                     $newRule->action = 'block';
305 305
                 }
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
         $filterRecord = NetworkFilters::findFirstById($networkId);
331 331
 
332 332
         $errors = null;
333
-        if ($filterRecord !== null && ! $filterRecord->delete()) {
333
+        if ($filterRecord !== null && !$filterRecord->delete()) {
334 334
             $errors = $filterRecord->getMessages();
335 335
         }
336 336
 
Please login to merge, or discard this patch.
src/Common/Messages/cs.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <?php
2 2
 return [
3 3
     /**
4
- * Copyright © MIKO LLC - All Rights Reserved
5
- * Unauthorized copying of this file, via any medium is strictly prohibited
6
- * Proprietary and confidential
7
- * Written by Alexey Portnov, 7 2020
8
- */
4
+     * Copyright © MIKO LLC - All Rights Reserved
5
+     * Unauthorized copying of this file, via any medium is strictly prohibited
6
+     * Proprietary and confidential
7
+     * Written by Alexey Portnov, 7 2020
8
+     */
9 9
     'March' => 'Březen',
10 10
     'April' => 'Duben',
11 11
     'May' => 'Květen',
Please login to merge, or discard this patch.
src/Common/Messages/zh_Hans.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <?php
2 2
 return [
3 3
     /**
4
- * Copyright © MIKO LLC - All Rights Reserved
5
- * Unauthorized copying of this file, via any medium is strictly prohibited
6
- * Proprietary and confidential
7
- * Written by Alexey Portnov, 7 2020
8
- */
4
+     * Copyright © MIKO LLC - All Rights Reserved
5
+     * Unauthorized copying of this file, via any medium is strictly prohibited
6
+     * Proprietary and confidential
7
+     * Written by Alexey Portnov, 7 2020
8
+     */
9 9
     'March' => '三月',
10 10
     'April' => '四月',
11 11
     'May' => '五月',
Please login to merge, or discard this patch.
src/Common/Messages/pl.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <?php
2 2
 return [
3 3
     /**
4
- * Copyright © MIKO LLC - All Rights Reserved
5
- * Unauthorized copying of this file, via any medium is strictly prohibited
6
- * Proprietary and confidential
7
- * Written by Alexey Portnov, 7 2020
8
- */
4
+     * Copyright © MIKO LLC - All Rights Reserved
5
+     * Unauthorized copying of this file, via any medium is strictly prohibited
6
+     * Proprietary and confidential
7
+     * Written by Alexey Portnov, 7 2020
8
+     */
9 9
     'tf_ActionPlayMessage' => 'Odtwórz plik <b>% message%</b>',
10 10
     'tf_ActionTransferToExtension' => 'Przekaż połączenie na <b>%message%</b>',
11 11
     'tf_TableColumnDatePeriod' => 'Okres',
Please login to merge, or discard this patch.
src/Common/Messages/uk.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <?php
2 2
 return [
3 3
     /**
4
- * Copyright © MIKO LLC - All Rights Reserved
5
- * Unauthorized copying of this file, via any medium is strictly prohibited
6
- * Proprietary and confidential
7
- * Written by Alexey Portnov, 7 2020
8
- */
4
+     * Copyright © MIKO LLC - All Rights Reserved
5
+     * Unauthorized copying of this file, via any medium is strictly prohibited
6
+     * Proprietary and confidential
7
+     * Written by Alexey Portnov, 7 2020
8
+     */
9 9
     'January' => 'Січень',
10 10
     'February' => 'Лютий',
11 11
     'March' => 'Березень',
Please login to merge, or discard this patch.
src/Common/Messages/fr.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <?php
2 2
 return [
3 3
     /**
4
- * Copyright © MIKO LLC - All Rights Reserved
5
- * Unauthorized copying of this file, via any medium is strictly prohibited
6
- * Proprietary and confidential
7
- * Written by Alexey Portnov, 7 2020
8
- */
4
+     * Copyright © MIKO LLC - All Rights Reserved
5
+     * Unauthorized copying of this file, via any medium is strictly prohibited
6
+     * Proprietary and confidential
7
+     * Written by Alexey Portnov, 7 2020
8
+     */
9 9
     'January' => 'Janvier',
10 10
     'sntry_SuccessMessage' => 'Merci pour votre aide!',
11 11
     'sntry_ErrorFormEntry' => 'Les champs ne sont pas remplis, corrigez et réessayez!',
Please login to merge, or discard this patch.
src/Common/Messages/tr.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <?php
2 2
 return [
3 3
     /**
4
- * Copyright © MIKO LLC - All Rights Reserved
5
- * Unauthorized copying of this file, via any medium is strictly prohibited
6
- * Proprietary and confidential
7
- * Written by Alexey Portnov, 7 2020
8
- */
4
+     * Copyright © MIKO LLC - All Rights Reserved
5
+     * Unauthorized copying of this file, via any medium is strictly prohibited
6
+     * Proprietary and confidential
7
+     * Written by Alexey Portnov, 7 2020
8
+     */
9 9
     'ex_ValidateForwardingToBeFilled' => 'Yönlendirme ayarlarında, zaman aşımı yönlendirme numarası doldurulmaz',
10 10
     'ex_ValidateRingingBeforeForwardOutOfRange' => 'Yönlendirme ayarlarında, aktarımdan önceki süre yanlış belirtilir. {RuleValue} arasında bir değer seçin.',
11 11
     'ex_ValidateNumberIsEmpty' => 'Çalışan uzantısı doldurulmadı',
Please login to merge, or discard this patch.
src/Common/Messages/vi.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <?php
2 2
 return [
3 3
     /**
4
- * Copyright © MIKO LLC - All Rights Reserved
5
- * Unauthorized copying of this file, via any medium is strictly prohibited
6
- * Proprietary and confidential
7
- * Written by Alexey Portnov, 7 2020
8
- */
4
+     * Copyright © MIKO LLC - All Rights Reserved
5
+     * Unauthorized copying of this file, via any medium is strictly prohibited
6
+     * Proprietary and confidential
7
+     * Written by Alexey Portnov, 7 2020
8
+     */
9 9
     'upd_UploadInProgress' => 'Đang tải xuống tệp cập nhật ...',
10 10
     'upd_UpgradeInProgress' => 'Các tập tin hệ thống đang được cập nhật ...',
11 11
     'ext_TableColumnDescription' => 'Tên mô-đun',
Please login to merge, or discard this patch.