Passed
Push — develop ( 59cb4c...debec8 )
by Nikolay
06:26 queued 31s
created
src/AdminCabinet/Controllers/IncomingRoutesController.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
                 ],
74 74
             ],
75 75
         ];
76
-        $extensions               = Extensions::find($parameters);
76
+        $extensions = Extensions::find($parameters);
77 77
         foreach ($extensions as $record) {
78 78
             $forwardingExtensions[$record->number] = $record ? $record->getRepresent() : '';
79 79
         }
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
      */
93 93
     public function modifyAction(string $ruleId = '') :void
94 94
     {
95
-        if ((int)$ruleId === 1) {
95
+        if ((int) $ruleId === 1) {
96 96
             $this->forward('incoming-routes/index');
97 97
         } // Первая строка маршрут по умолчанию, ее не трогаем.
98 98
 
@@ -121,11 +121,11 @@  discard block
 block discarded – undo
121 121
                 ],
122 122
             ],
123 123
         ];
124
-        $extensions               = Extensions::find($parameters);
124
+        $extensions = Extensions::find($parameters);
125 125
         foreach ($extensions as $record) {
126 126
             $forwardingExtensions[$record->number] = $record ? $record->getRepresent() : '';
127 127
         }
128
-        $form                  = new IncomingRouteEditForm(
128
+        $form = new IncomingRouteEditForm(
129 129
             $rule,
130 130
             ['extensions' => $forwardingExtensions, 'providers' => $providersList]
131 131
         );
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
      */
140 140
     public function saveAction(): void
141 141
     {
142
-        if ( ! $this->request->isPost()) {
142
+        if (!$this->request->isPost()) {
143 143
             return;
144 144
         }
145 145
         $this->db->begin();
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
                 case 'priority':
162 162
                     if (empty($data[$name])) {
163 163
                         // Найдем строчку с самым высоким приоиртетом, кроме 9999
164
-                        $params      = [
164
+                        $params = [
165 165
                             'column'     => 'priority',
166 166
                             'conditions' => 'priority != 9999',
167 167
                         ];
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
      */
206 206
     public function deleteAction(string $ruleId)
207 207
     {
208
-        if ((int)$ruleId === 1) {
208
+        if ((int) $ruleId === 1) {
209 209
             $this->forward('incoming-routes/index'); // Первая строка маршрут по умолчанию, ее не трогаем.
210 210
         }
211 211
 
@@ -224,20 +224,20 @@  discard block
 block discarded – undo
224 224
      */
225 225
     public function changePriorityAction(string $ruleId = null)
226 226
     {
227
-        if ((int)$ruleId === 1) {
227
+        if ((int) $ruleId === 1) {
228 228
             return;
229 229
         } // Первая строка маршрут по умолчанию, ее не трогаем.
230 230
 
231 231
         $this->view->disable();
232 232
         $result = false;
233 233
 
234
-        if ( ! $this->request->isPost()) {
234
+        if (!$this->request->isPost()) {
235 235
             return;
236 236
         }
237 237
         $data = $this->request->getPost();
238 238
         $rule = IncomingRoutingTable::findFirstById($ruleId);
239 239
         if ($rule !== null) {
240
-            $rule->priority = (int)$data['newPriority'];
240
+            $rule->priority = (int) $data['newPriority'];
241 241
             $result         = $rule->update();
242 242
         }
243 243
         echo json_encode($result);
Please login to merge, or discard this patch.
src/AdminCabinet/Controllers/AdvicesController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
                 }
48 48
             }
49 49
             $newResult = $this->$currentAdvice();
50
-            if ( ! empty($newResult)) {
50
+            if (!empty($newResult)) {
51 51
                 $arrMessages[] = $newResult;
52 52
             }
53 53
             $this->session->set(
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
         $result              = [];
67 67
         foreach ($arrMessages as $message) {
68 68
             foreach ($message as $key => $value) {
69
-                if ( ! empty($value)) {
69
+                if (!empty($value)) {
70 70
                     $result[$key][] = $value;
71 71
                 }
72 72
             }
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
      */
133 133
     private function checkStorage(): array
134 134
     {
135
-        if ( ! is_array($_COOKIE) || ! array_key_exists(session_name(), $_COOKIE)) {
135
+        if (!is_array($_COOKIE) || !array_key_exists(session_name(), $_COOKIE)) {
136 136
             return [];
137 137
         }
138 138
 
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
         if ($storageList !== null && property_exists($storageList, 'data')) {
148 148
             $storageDiskMounted = false;
149 149
             $disks              = $storageList->data;
150
-            if ( ! is_array($disks)) {
150
+            if (!is_array($disks)) {
151 151
                 $disks = [$disks];
152 152
             }
153 153
             foreach ($disks as $disk) {
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
     function checkRegistration(): array
219 219
     {
220 220
         $licKey = PbxSettings::getValueByKey('PBXLicense');
221
-        if ( ! empty($licKey)) {
221
+        if (!empty($licKey)) {
222 222
             $checkBaseFeature = $this->license->featureAvailable(33);
223 223
             if ($checkBaseFeature['success'] === false) {
224 224
                 if ($this->language === 'ru') {
Please login to merge, or discard this patch.