Passed
Pull Request — master (#23)
by Nikolay
09:42 queued 03:08
created
src/AdminCabinet/Controllers/TimeSettingsController.php 2 patches
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@
 block discarded – undo
91 91
             $offset_prefix    = $offset < 0 ? '-' : '+';
92 92
             $offset_formatted = gmdate('H:i', $offset);
93 93
 
94
-            $pretty_offset = "UTC${offset_prefix}${offset_formatted}";
94
+            $pretty_offset = "utc${offset_prefix}${offset_formatted}";
95 95
 
96 96
             $timezone_list[$timezone] = "$timezone (${pretty_offset})";
97 97
         }
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
         $timezone_offsets = [];
77 77
         foreach ($timezones as $timezone) {
78 78
             $tz                          = new DateTimeZone($timezone);
79
-            $timezone_offsets[$timezone] = (int)$tz->getOffset(new DateTime());
79
+            $timezone_offsets[$timezone] = (int) $tz->getOffset(new DateTime());
80 80
         }
81 81
 
82 82
         // sort timezone by offset
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
      */
101 101
     public function saveAction()
102 102
     {
103
-        if ( ! $this->request->isPost()) {
103
+        if (!$this->request->isPost()) {
104 104
             return;
105 105
         }
106 106
 
@@ -122,12 +122,12 @@  discard block
 block discarded – undo
122 122
                     break;
123 123
                 case "NTPServer":
124 124
                     $ntp_servers   = preg_split('/\r\n|\r|\n| |,/', $data[$key]);
125
-                    if (is_array($ntp_servers)){
125
+                    if (is_array($ntp_servers)) {
126 126
                         $record->value = implode(PHP_EOL, $ntp_servers);
127 127
                     }
128 128
                     break;
129 129
                 default:
130
-                    if ( ! array_key_exists($key, $data)) {
130
+                    if (!array_key_exists($key, $data)) {
131 131
                         continue 2;
132 132
                     }
133 133
                     $record->value = $data[$key];
Please login to merge, or discard this patch.
src/Core/Asterisk/agi-bin/clean_timeout.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,6 +22,6 @@
 block discarded – undo
22 22
 
23 23
 // Перестрахова на случай с перехватом звонка через *8.
24 24
 $timeoutChannel = $am->GetVar($srcChannel, 'MASTER_CHANNEL(M_TIMEOUT_CHANNEL)', null, false);
25
-if(is_string($timeoutChannel) && !empty($timeoutChannel)){
25
+if (is_string($timeoutChannel) && !empty($timeoutChannel)) {
26 26
     $am->SetVar($timeoutChannel, "TIMEOUT(absolute)", '0');
27 27
 }
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.