Passed
Push — develop ( 4a8e6d...3766e9 )
by Nikolay
06:00 queued 10s
created
sites/admin-cabinet/index.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -44,9 +44,9 @@
 block discarded – undo
44 44
 
45 45
 try {
46 46
     $application = new Application($di);
47
-	echo $application->handle($_SERVER['REQUEST_URI'])->getContent();
47
+    echo $application->handle($_SERVER['REQUEST_URI'])->getContent();
48 48
 } catch (Throwable $e) {
49
-	$errorLogger->captureException($e);
50
-	PhpError::exceptionHandler($e);
51
-	echo $e->getMessage();
49
+    $errorLogger->captureException($e);
50
+    PhpError::exceptionHandler($e);
51
+    echo $e->getMessage();
52 52
 }
53 53
\ No newline at end of file
Please login to merge, or discard this patch.
sites/pbxcore/index.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 $di = new FactoryDefault();
18 18
 
19 19
 // Auto-loader configuration
20
-require_once __DIR__ . '/../../src/Common/Config/ClassLoader.php';
20
+require_once __DIR__.'/../../src/Common/Config/ClassLoader.php';
21 21
 
22 22
 // Attach Sentry error logger
23 23
 $errorLogger = new SentryErrorLogger('pbx-core-rest');
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 } catch (Throwable $e) {
35 35
     $errorLogger->captureException($e);
36 36
     echo $e->getMessage();
37
-    Util::sysLogMsg('pbx_core_api', $e->getMessage() );
37
+    Util::sysLogMsg('pbx_core_api', $e->getMessage());
38 38
 }
39 39
 
40 40
 
Please login to merge, or discard this patch.
src/Core/Workers/WorkerModelsEvents.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
     private int $timeout = 2;
105 105
     private array $arrObject;
106 106
     private array $PRIORITY_R;
107
-    protected int $maxProc=1;
107
+    protected int $maxProc = 1;
108 108
 
109 109
 
110 110
     /**
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
         foreach ($additionalModules as $appClass) {
191 191
             // Проверим, зависит ли объект от измененных данных.
192 192
             $dependences = $appClass->dependenceModels();
193
-            if (in_array($called_class, $dependences)){
193
+            if (in_array($called_class, $dependences)) {
194 194
                 // Получаем новые настройки.
195 195
                 $appClass->getSettings();
196 196
             }
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
                 break;
239 239
             case Codecs::class:
240 240
                 $this->modified_tables[self::R_IAX] = true;
241
-                $this->modified_tables[self::R_SIP]     = true;
241
+                $this->modified_tables[self::R_SIP] = true;
242 242
                 break;
243 243
             case IncomingRoutingTable::class:
244 244
                 $this->modified_tables[self::R_DIALPLAN] = true;
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
                 break;
272 272
             case PbxSettings::class:
273 273
                 $pbxSettings = PbxSettings::findFirstByKey($data['recordId']);
274
-                if ($pbxSettings===null){
274
+                if ($pbxSettings === null) {
275 275
                     return;
276 276
                 }
277 277
                 if ($pbxSettings->itHasFeaturesSettingsChanges()) {
@@ -313,16 +313,16 @@  discard block
 block discarded – undo
313 313
                     $this->modified_tables[self::R_NATS]    = true;
314 314
                 }
315 315
                 if ($pbxSettings->itHasTimeZoneSettings()) {
316
-                    $this->modified_tables[self::R_TIMEZONE]    = true;
317
-                    $this->modified_tables[self::R_NGINX]    = true;
318
-                    $this->modified_tables[self::R_PHP_FPM]    = true;
316
+                    $this->modified_tables[self::R_TIMEZONE] = true;
317
+                    $this->modified_tables[self::R_NGINX] = true;
318
+                    $this->modified_tables[self::R_PHP_FPM] = true;
319 319
                     $this->modified_tables[self::R_REST_API_WORKER] = true;
320 320
                 }
321 321
                 if ($pbxSettings->itHasNTPSettings()) {
322
-                    $this->modified_tables[self::R_NTP]    = true;
322
+                    $this->modified_tables[self::R_NTP] = true;
323 323
                 }
324 324
                 if ($pbxSettings->itHasCallRecordSettings()) {
325
-                    $this->modified_tables[ self::R_CALL_EVENTS_WORKER]  = true;
325
+                    $this->modified_tables[self::R_CALL_EVENTS_WORKER] = true;
326 326
                 }
327 327
                 break;
328 328
             case Sip::class:
@@ -487,7 +487,7 @@  discard block
 block discarded – undo
487 487
      */
488 488
     public function reloadNginx(): void
489 489
     {
490
-        $nginxConf  = new NginxConf();
490
+        $nginxConf = new NginxConf();
491 491
         $nginxConf->generateConf();
492 492
         $nginxConf->reStart();
493 493
     }
Please login to merge, or discard this patch.
src/Core/System/Upgrade/UpdateSystemConfig.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
         if ($previous_version !== $current_version) {
48 48
             $upgradeClasses      = [];
49 49
             $upgradeClassesDir   = appPath('src/Core/System/Upgrade/Releases');
50
-            $upgradeClassesFiles = glob($upgradeClassesDir . '/*.php', GLOB_NOSORT);
50
+            $upgradeClassesFiles = glob($upgradeClassesDir.'/*.php', GLOB_NOSORT);
51 51
             foreach ($upgradeClassesFiles as $file) {
52 52
                 $className        = pathinfo($file)['filename'];
53 53
                 $moduleModelClass = "\\MikoPBX\\Core\\System\\Upgrade\\Releases\\{$className}";
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
                 if (version_compare($previous_version, $releaseNumber, '<')) {
62 62
                     $processor = new $upgradeClass();
63 63
                     $processor->processUpdate();
64
-                    Util::echoWithSyslog(' - UpdateConfigs: Upgrade system up to ' . $releaseNumber . ' ');
64
+                    Util::echoWithSyslog(' - UpdateConfigs: Upgrade system up to '.$releaseNumber.' ');
65 65
                     Util::echoGreenDone();
66 66
                 }
67 67
             }
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
         /** @var \MikoPBX\Common\Models\PbxExtensionModules $modules */
82 82
         $modules = PbxExtensionModules::find()->toArray();
83 83
         foreach ($modules as $module) {
84
-            if ( ! is_dir("{$this->config->path('core.modulesDir')}/{$module['uniqid']}")) {
84
+            if (!is_dir("{$this->config->path('core.modulesDir')}/{$module['uniqid']}")) {
85 85
                 $module->delete();
86 86
             }
87 87
         }
Please login to merge, or discard this patch.
src/AdminCabinet/Controllers/PbxExtensionModulesController.php 1 patch
Upper-Lower-Casing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
      */
58 58
     public function modifyAction(string $uniqid): void
59 59
     {
60
-        $menuSettings               = "AdditionalMenuItem{$uniqid}";
60
+        $menuSettings               = "additionalmenuitem{$uniqid}";
61 61
         $unCamelizedControllerName  = Text::uncamelize($uniqid, '-');
62 62
         $previousMenuSettings       = PbxSettings::findFirstByKey($menuSettings);
63 63
         $this->view->showAtMainMenu = $previousMenuSettings !== false;
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
                 'href'          => $this->url->get($unCamelizedControllerName),
70 70
                 'group'         => '',
71 71
                 'iconClass'     => 'puzzle piece',
72
-                'caption'       => "Breadcrumb$uniqid",
72
+                'caption'       => "breadcrumb$uniqid",
73 73
                 'showAtSidebar' => false,
74 74
             ];
75 75
             $previousMenuSettings->value = json_encode($value);
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
         $options                = json_decode($previousMenuSettings->value, true);
78 78
         $this->view->form       = new PbxExtensionModuleSettingsForm($previousMenuSettings, $options);
79 79
         $this->view->title      = $this->translation->_('ext_SettingsForModule') . ' ' . $this->translation->_(
80
-                "Breadcrumb$uniqid"
80
+                "breadcrumb$uniqid"
81 81
             );
82 82
         $this->view->submitMode = null;
83 83
         $this->view->indexUrl   = $unCamelizedControllerName;
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
         $result  = [];
129 129
         $modules = PbxExtensionModules::getEnabledModulesArray();
130 130
         foreach ($modules as $module) {
131
-            $menuSettings         = "AdditionalMenuItem{$module['uniqid']}";
131
+            $menuSettings         = "additionalmenuitem{$module['uniqid']}";
132 132
             $previousMenuSettings = PbxSettings::findFirstByKey($menuSettings);
133 133
             if ($previousMenuSettings !== null) {
134 134
                 $result['items'][] = json_decode($previousMenuSettings->value, true);
Please login to merge, or discard this patch.
src/Common/Providers/PBXConfModulesProvider.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@
 block discarded – undo
83 83
         $modules = PbxExtensionModules::getEnabledModulesArray();
84 84
         foreach ($modules as $value) {
85 85
             $class_name      = str_replace('Module', '', $value['uniqid']);
86
-            $full_class_name = "\\Modules\\{$value['uniqid']}\\Lib\\{$class_name}Conf";
86
+            $full_class_name = "\\Modules\\{$value['uniqid']}\\Lib\\{$class_name}conf";
87 87
             if (class_exists($full_class_name)) {
88 88
                 $object = new $full_class_name();
89 89
                 if ($object instanceof ConfigClass){
Please login to merge, or discard this patch.
src/Common/Models/PbxSettings.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
      * @Primary
26 26
      * @Column(type="string", nullable=false)
27 27
      */
28
-    public string $key='';
28
+    public string $key = '';
29 29
 
30 30
     /**
31 31
      * @Column(type="string", nullable=true)
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
     {
43 43
         return [
44 44
             'Name'                            => 'PBX system',
45
-            'VirtualHardwareType'             => 'REAL',//VMWARE,HYPERV,AWS,AZURE
45
+            'VirtualHardwareType'             => 'REAL', //VMWARE,HYPERV,AWS,AZURE
46 46
             'Description'                     => '',
47 47
             'RestartEveryNight'               => '0',
48 48
             'SIPPort'                         => '5060',
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
             'VoicemailNotificationsEmail'     => '[email protected]',
89 89
             'VoicemailExten'                  => '*001',
90 90
             'PBXLanguage'                     => 'en-en',
91
-            'PBXInternalExtensionLength'      => '3',// Длина внутреннего номера
91
+            'PBXInternalExtensionLength'      => '3', // Длина внутреннего номера
92 92
             'PBXRecordCalls'                  => '1',
93 93
             'PBXSplitAudioThread'             => '0',
94 94
             'PBXCallParkingExt'               => '800',
@@ -138,8 +138,8 @@  discard block
 block discarded – undo
138 138
      */
139 139
     public static function getValueByKey(string $key): string
140 140
     {
141
-        $cacheKey   = explode('\\', static::class)[3];
142
-        $parameters= [
141
+        $cacheKey = explode('\\', static::class)[3];
142
+        $parameters = [
143 143
             'cache' => [
144 144
                 'key'=>$cacheKey.'-getValueByKey',
145 145
                 'lifetime' => 300,
@@ -147,10 +147,10 @@  discard block
 block discarded – undo
147 147
         ];
148 148
         $currentSettings = parent::find($parameters);
149 149
 
150
-        foreach ($currentSettings as $record){
151
-            if ($record->key===$key
150
+        foreach ($currentSettings as $record) {
151
+            if ($record->key === $key
152 152
                 && isset($record->value)
153
-            ){
153
+            ) {
154 154
                 return $record->value;
155 155
             }
156 156
         }
Please login to merge, or discard this patch.
src/Common/Models/ModelsBase.php 1 patch
Spacing   +58 added lines, -58 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
             $moduleDir = PbxExtensionUtils::getModuleDir($module['uniqid']);
68 68
 
69 69
             $moduleJson = "{$moduleDir}/module.json";
70
-            if ( ! file_exists($moduleJson)) {
70
+            if (!file_exists($moduleJson)) {
71 71
                 continue;
72 72
             }
73 73
             $jsonString            = file_get_contents($moduleJson);
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
             }
79 79
 
80 80
             $moduleModelsDir = "{$moduleDir}/Models";
81
-            $results         = glob($moduleModelsDir . '/*.php', GLOB_NOSORT);
81
+            $results         = glob($moduleModelsDir.'/*.php', GLOB_NOSORT);
82 82
             foreach ($results as $file) {
83 83
                 $className        = pathinfo($file)['filename'];
84 84
                 $moduleModelClass = "\\Modules\\{$module['uniqid']}\\Models\\{$className}";
@@ -113,16 +113,16 @@  discard block
 block discarded – undo
113 113
                 $newErrorMessage = $this->t('ConstraintViolation');
114 114
                 $newErrorMessage .= "<ul class='list'>";
115 115
                 if ($relatedRecords === false) {
116
-                    throw new Model\Exception('Error on models relationship ' . $errorMessage);
116
+                    throw new Model\Exception('Error on models relationship '.$errorMessage);
117 117
                 }
118 118
                 if ($relatedRecords instanceof Resultset) {
119 119
                     foreach ($relatedRecords as $item) {
120 120
                         if ($item instanceof ModelsBase) {
121
-                            $newErrorMessage .= '<li>' . $item->getRepresent(true) . '</li>';
121
+                            $newErrorMessage .= '<li>'.$item->getRepresent(true).'</li>';
122 122
                         }
123 123
                     }
124 124
                 } elseif ($relatedRecords instanceof ModelsBase) {
125
-                    $newErrorMessage .= '<li>' . $relatedRecords->getRepresent(true) . '</li>';
125
+                    $newErrorMessage .= '<li>'.$relatedRecords->getRepresent(true).'</li>';
126 126
                 } else {
127 127
                     $newErrorMessage .= '<li>Unknown object</li>';
128 128
                 }
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
                 if (empty($this->id)) {
174 174
                     $name .= $this->t('mo_NewElementCallQueues');
175 175
                 } else {
176
-                    $name .= $this->t('mo_CallQueueShort4Dropdown') . ': ' . $this->name;
176
+                    $name .= $this->t('mo_CallQueueShort4Dropdown').': '.$this->name;
177 177
                 }
178 178
                 break;
179 179
             case ConferenceRooms::class:
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
                 if (empty($this->id)) {
182 182
                     $name .= $this->t('mo_NewElementConferenceRooms');
183 183
                 } else {
184
-                    $name .= $this->t('mo_ConferenceRoomsShort4Dropdown') . ': ' . $this->name;
184
+                    $name .= $this->t('mo_ConferenceRoomsShort4Dropdown').': '.$this->name;
185 185
                 }
186 186
                 break;
187 187
             case CustomFiles::class:
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
                 if (empty($this->id)) {
193 193
                     $name .= $this->t('mo_NewElementDialplanApplications');
194 194
                 } else {
195
-                    $name .= $this->t('mo_ApplicationShort4Dropdown') . ': ' . $this->name;
195
+                    $name .= $this->t('mo_ApplicationShort4Dropdown').': '.$this->name;
196 196
                 }
197 197
                 break;
198 198
             case ExtensionForwardingRights::class:
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
                 if (empty($this->id)) {
255 255
                     $name .= $this->t('mo_NewElementIax');
256 256
                 } elseif ($this->disabled === '1') {
257
-                    $name .= "{$this->description} ({$this->t( 'mo_Disabled' )})";
257
+                    $name .= "{$this->description} ({$this->t('mo_Disabled')})";
258 258
                 } else {
259 259
                     $name .= $this->description;
260 260
                 }
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
                 if (empty($this->id)) {
265 265
                     $name .= $this->t('mo_NewElementIvrMenu');
266 266
                 } else {
267
-                    $name .= $this->t('mo_IVRMenuShort4Dropdown') . ': ' . $this->name;
267
+                    $name .= $this->t('mo_IVRMenuShort4Dropdown').': '.$this->name;
268 268
                 }
269 269
                 break;
270 270
             case IvrMenuActions::class:
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
                 $name = '<i class="map signs icon"></i> ';
278 278
                 if (empty($this->id)) {
279 279
                     $name .= $this->t('mo_NewElementIncomingRoutingTable');
280
-                } elseif ( ! empty($this->note)) {
280
+                } elseif (!empty($this->note)) {
281 281
                     $name .= $this->t('repIncomingRoutingTable', ['represent' => $this->note]);
282 282
                 } else {
283 283
                     $name .= $this->t('repIncomingRoutingTableNumber', ['represent' => $this->id]);
@@ -292,8 +292,8 @@  discard block
 block discarded – undo
292 292
                 if (empty($this->id)) {
293 293
                     $name .= $this->t('mo_NewElementNetworkFilters');
294 294
                 } else {
295
-                    $name .= $this->description . '('
296
-                        . $this->t('fw_PermitNetwork') . ': ' . $this->permit
295
+                    $name .= $this->description.'('
296
+                        . $this->t('fw_PermitNetwork').': '.$this->permit
297 297
                         . ')';
298 298
                 }
299 299
                 break;
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
                 $name = '<i class="random icon"></i> ';
302 302
                 if (empty($this->id)) {
303 303
                     $name .= $this->t('mo_NewElementOutgoingRoutingTable');
304
-                } elseif ( ! empty($this->rulename)) {
304
+                } elseif (!empty($this->rulename)) {
305 305
                     $name .= $this->t('repOutgoingRoutingTable', ['represent' => $this->rulename]);
306 306
                 } else {
307 307
                     $name .= $this->t('repOutgoingRoutingTableNumber', ['represent' => $this->id]);
@@ -311,24 +311,24 @@  discard block
 block discarded – undo
311 311
                 $name = '<i class="time icon"></i> ';
312 312
                 if (empty($this->id)) {
313 313
                     $name .= $this->t('mo_NewElementOutWorkTimes');
314
-                } elseif ( ! empty($this->description)) {
314
+                } elseif (!empty($this->description)) {
315 315
                     $name .= $this->t('repOutWorkTimes', ['represent' => $this->description]);
316 316
                 } else {
317 317
                     $represent = '';
318 318
                     if (is_numeric($this->date_from)) {
319
-                        $represent .= date("d/m/Y", $this->date_from) . '-';
319
+                        $represent .= date("d/m/Y", $this->date_from).'-';
320 320
                     }
321 321
                     if (is_numeric($this->date_to)) {
322
-                        $represent .= date("d/m/Y", $this->date_to) . ' ';
322
+                        $represent .= date("d/m/Y", $this->date_to).' ';
323 323
                     }
324 324
                     if (isset($this->weekday_from)) {
325
-                        $represent .= $this->t(date('D', strtotime("Sunday +{$this->weekday_from} days"))) . '-';
325
+                        $represent .= $this->t(date('D', strtotime("Sunday +{$this->weekday_from} days"))).'-';
326 326
                     }
327 327
                     if (isset($this->weekday_to)) {
328
-                        $represent .= $this->t(date('D', strtotime("Sunday +{$this->weekday_to} days"))) . ' ';
328
+                        $represent .= $this->t(date('D', strtotime("Sunday +{$this->weekday_to} days"))).' ';
329 329
                     }
330 330
                     if (isset($this->time_from) || isset($this->time_to)) {
331
-                        $represent .= $this->time_from . ' - ' . $this->time_to . ' ';
331
+                        $represent .= $this->time_from.' - '.$this->time_to.' ';
332 332
                     }
333 333
                     $name .= $this->t('repOutWorkTimes', ['represent' => $represent]);
334 334
                 }
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
                 break;
346 346
             case PbxExtensionModules::class:
347 347
                 $name = '<i class="puzzle piece icon"></i> '
348
-                    . $this->t('mo_ModuleShort4Dropdown') . ': '
348
+                    . $this->t('mo_ModuleShort4Dropdown').': '
349 349
                     . $this->name;
350 350
                 break;
351 351
             case Sip::class:
@@ -353,14 +353,14 @@  discard block
 block discarded – undo
353 353
                 if (empty($this->id)) {
354 354
                     $name .= $this->t('mo_NewElementSip');
355 355
                 } elseif ($this->disabled === '1') {
356
-                    $name .= "{$this->description} ({$this->t( 'mo_Disabled' )})";
356
+                    $name .= "{$this->description} ({$this->t('mo_Disabled')})";
357 357
                 } else {
358 358
                     $name .= $this->description;
359 359
                 }
360 360
 
361 361
                 break;
362 362
             case Users::class:
363
-                $name = '<i class="user outline icon"></i> ' . $this->username;
363
+                $name = '<i class="user outline icon"></i> '.$this->username;
364 364
                 break;
365 365
             case SoundFiles::class:
366 366
                 $name = '<i class="file audio outline icon"></i> ';
@@ -379,7 +379,7 @@  discard block
 block discarded – undo
379 379
             $link     = $this->getWebInterfaceLink();
380 380
             $category = explode('\\', static::class)[3];
381 381
             $result   = $this->t(
382
-                'rep' . $category,
382
+                'rep'.$category,
383 383
                 [
384 384
                     'represent' => "<a href='{$link}'>{$name}</a>",
385 385
                 ]
@@ -404,7 +404,7 @@  discard block
 block discarded – undo
404 404
 
405 405
         if (strlen($s) > $max_length) {
406 406
             $offset = ($max_length - 3) - strlen($s);
407
-            $s      = substr($s, 0, strrpos($s, ' ', $offset)) . '...';
407
+            $s      = substr($s, 0, strrpos($s, ' ', $offset)).'...';
408 408
         }
409 409
 
410 410
         return $s;
@@ -423,80 +423,80 @@  discard block
 block discarded – undo
423 423
         $link    = '#';
424 424
         switch (static::class) {
425 425
             case AsteriskManagerUsers::class:
426
-                $link = $url->get('asterisk-managers/modify/' . $this->id, null, null, $baseUri);
426
+                $link = $url->get('asterisk-managers/modify/'.$this->id, null, null, $baseUri);
427 427
                 break;
428 428
             case CallQueueMembers::class:
429
-                $link = $url->get('call-queues/modify/' . $this->CallQueues->uniqid, null, null, $baseUri);
429
+                $link = $url->get('call-queues/modify/'.$this->CallQueues->uniqid, null, null, $baseUri);
430 430
                 break;
431 431
             case CallQueues::class:
432
-                $link = $url->get('call-queues/modify/' . $this->uniqid, null, null, $baseUri);
432
+                $link = $url->get('call-queues/modify/'.$this->uniqid, null, null, $baseUri);
433 433
                 break;
434 434
             case ConferenceRooms::class:
435
-                $link = $url->get('conference-rooms/modify/' . $this->uniqid, null, null, $baseUri);
435
+                $link = $url->get('conference-rooms/modify/'.$this->uniqid, null, null, $baseUri);
436 436
                 break;
437 437
             case CustomFiles::class:
438
-                $link = $url->get('custom-files/modify/' . $this->id, null, null, $baseUri);
438
+                $link = $url->get('custom-files/modify/'.$this->id, null, null, $baseUri);
439 439
                 break;
440 440
             case DialplanApplications::class:
441
-                $link = $url->get('dialplan-applications/modify/' . $this->uniqid, null, null, $baseUri);
441
+                $link = $url->get('dialplan-applications/modify/'.$this->uniqid, null, null, $baseUri);
442 442
                 break;
443 443
             case ExtensionForwardingRights::class:
444 444
 
445 445
                 break;
446 446
             case Extensions::class:
447
-                $link = $url->get('extensions/modify/' . $this->id, null, null, $baseUri);
447
+                $link = $url->get('extensions/modify/'.$this->id, null, null, $baseUri);
448 448
                 break;
449 449
             case ExternalPhones::class:
450 450
                 if ($this->Extensions->is_general_user_number === "1") {
451
-                    $parameters    = [
452
-                        'conditions' => 'is_general_user_number="1" AND type="' . Extensions::TYPE_EXTERNAL . '" AND userid=:userid:',
451
+                    $parameters = [
452
+                        'conditions' => 'is_general_user_number="1" AND type="'.Extensions::TYPE_EXTERNAL.'" AND userid=:userid:',
453 453
                         'bind'       => [
454 454
                             'userid' => $this->Extensions->userid,
455 455
                         ],
456 456
                     ];
457 457
                     $needExtension = Extensions::findFirst($parameters);
458
-                    $link          = $url->get('extensions/modify/' . $needExtension->id, null, null, $baseUri);
458
+                    $link          = $url->get('extensions/modify/'.$needExtension->id, null, null, $baseUri);
459 459
                 } else {
460
-                    $link = '#';//TODO сделать если будет раздел для допоплнинельных номеров пользователя
460
+                    $link = '#'; //TODO сделать если будет раздел для допоплнинельных номеров пользователя
461 461
                 }
462 462
                 break;
463 463
             case Fail2BanRules::class:
464
-                $link = '#';//TODO сделать если будет fail2ban
464
+                $link = '#'; //TODO сделать если будет fail2ban
465 465
                 break;
466 466
             case FirewallRules::class:
467
-                $link = $url->get('firewall/modify/' . $this->NetworkFilters->id, null, null, $baseUri);
467
+                $link = $url->get('firewall/modify/'.$this->NetworkFilters->id, null, null, $baseUri);
468 468
                 break;
469 469
             case Iax::class:
470
-                $link = $url->get('providers/modifyiax/' . $this->Providers->id, null, null, $baseUri);
470
+                $link = $url->get('providers/modifyiax/'.$this->Providers->id, null, null, $baseUri);
471 471
                 break;
472 472
             case IvrMenu::class:
473
-                $link = $url->get('ivr-menu/modify/' . $this->uniqid, null, null, $baseUri);
473
+                $link = $url->get('ivr-menu/modify/'.$this->uniqid, null, null, $baseUri);
474 474
                 break;
475 475
             case IvrMenuActions::class:
476
-                $link = $url->get('ivr-menu/modify/' . $this->IvrMenu->uniqid, null, null, $baseUri);
476
+                $link = $url->get('ivr-menu/modify/'.$this->IvrMenu->uniqid, null, null, $baseUri);
477 477
                 break;
478 478
             case Codecs::class:
479 479
                 break;
480 480
             case IncomingRoutingTable::class:
481
-                $link = $url->get('incoming-routes/modify/' . $this->id, null, null, $baseUri);
481
+                $link = $url->get('incoming-routes/modify/'.$this->id, null, null, $baseUri);
482 482
                 break;
483 483
             case LanInterfaces::class:
484 484
                 $link = $url->get('network/index/', null, null, $baseUri);
485 485
                 break;
486 486
             case NetworkFilters::class:
487
-                $link = $url->get('firewall/modify/' . $this->id, null, null, $baseUri);
487
+                $link = $url->get('firewall/modify/'.$this->id, null, null, $baseUri);
488 488
                 break;
489 489
             case OutgoingRoutingTable::class:
490
-                $link = $url->get('outbound-routes/modify/' . $this->id, null, null, $baseUri);
490
+                $link = $url->get('outbound-routes/modify/'.$this->id, null, null, $baseUri);
491 491
                 break;
492 492
             case OutWorkTimes::class:
493
-                $link = $url->get('out-off-work-time/modify/' . $this->id, null, null, $baseUri);
493
+                $link = $url->get('out-off-work-time/modify/'.$this->id, null, null, $baseUri);
494 494
                 break;
495 495
             case Providers::class:
496 496
                 if ($this->type === "IAX") {
497
-                    $link = $url->get('providers/modifyiax/' . $this->uniqid, null, null, $baseUri);
497
+                    $link = $url->get('providers/modifyiax/'.$this->uniqid, null, null, $baseUri);
498 498
                 } else {
499
-                    $link = $url->get('providers/modifysip/' . $this->uniqid, null, null, $baseUri);
499
+                    $link = $url->get('providers/modifysip/'.$this->uniqid, null, null, $baseUri);
500 500
                 }
501 501
                 break;
502 502
             case PbxSettings::class:
@@ -508,26 +508,26 @@  discard block
 block discarded – undo
508 508
             case Sip::class:
509 509
                 if ($this->Extensions) { // Это внутренний номер?
510 510
                     if ($this->Extensions->is_general_user_number === "1") {
511
-                        $link = $url->get('extensions/modify/' . $this->Extensions->id, null, null, $baseUri);
511
+                        $link = $url->get('extensions/modify/'.$this->Extensions->id, null, null, $baseUri);
512 512
                     } else {
513
-                        $link = '#';//TODO сделать если будет раздел для допоплнинельных номеров пользователя
513
+                        $link = '#'; //TODO сделать если будет раздел для допоплнинельных номеров пользователя
514 514
                     }
515 515
                 } elseif ($this->Providers) { // Это провайдер
516
-                    $link = $url->get('providers/modifysip/' . $this->Providers->id, null, null, $baseUri);
516
+                    $link = $url->get('providers/modifysip/'.$this->Providers->id, null, null, $baseUri);
517 517
                 }
518 518
                 break;
519 519
             case Users::class:
520
-                $parameters    = [
520
+                $parameters = [
521 521
                     'conditions' => 'userid=:userid:',
522 522
                     'bind'       => [
523 523
                         'userid' => $this->id,
524 524
                     ],
525 525
                 ];
526 526
                 $needExtension = Extensions::findFirst($parameters);
527
-                $link          = $url->get('extensions/modify/' . $needExtension->id, null, null, $baseUri);
527
+                $link          = $url->get('extensions/modify/'.$needExtension->id, null, null, $baseUri);
528 528
                 break;
529 529
             case SoundFiles::class:
530
-                $link = $url->get('sound-files/modify/' . $this->id, null, null, $baseUri);
530
+                $link = $url->get('sound-files/modify/'.$this->id, null, null, $baseUri);
531 531
                 break;
532 532
             default:
533 533
         }
@@ -543,7 +543,7 @@  discard block
 block discarded – undo
543 543
         $metaData      = $this->di->get('modelsMetadata');
544 544
         $defaultValues = $metaData->getDefaultValues($this);
545 545
         foreach ($defaultValues as $field => $value) {
546
-            if ( ! isset($this->{$field})) {
546
+            if (!isset($this->{$field})) {
547 547
                 $this->{$field} = $value;
548 548
             }
549 549
         }
@@ -677,7 +677,7 @@  discard block
 block discarded – undo
677 677
                 = $currentDeleteRecord->_modelsManager->getRelations(get_class($currentDeleteRecord));
678 678
         foreach ($relations as $relation) {
679 679
             $foreignKey = $relation->getOption('foreignKey');
680
-            if ( ! array_key_exists('action', $foreignKey)) {
680
+            if (!array_key_exists('action', $foreignKey)) {
681 681
                 continue;
682 682
             }
683 683
             // Check if there are some record which restrict delete current record
@@ -695,10 +695,10 @@  discard block
 block discarded – undo
695 695
                     ? ' OR ' : '';
696 696
                 $parameters['conditions']             .= $referencedField
697 697
                     . '= :field'
698
-                    . $index . ':';
698
+                    . $index.':';
699 699
                 $bindField
700 700
                                                       = $mappedFields[$index];
701
-                $parameters['bind']['field' . $index] = $currentDeleteRecord->$bindField;
701
+                $parameters['bind']['field'.$index] = $currentDeleteRecord->$bindField;
702 702
             }
703 703
             $relatedRecords = $relatedModel::find($parameters);
704 704
             switch ($foreignKey['action']) {
@@ -770,7 +770,7 @@  discard block
 block discarded – undo
770 770
     private function processSettingsChanges(string $action): void
771 771
     {
772 772
         if (php_sapi_name() !== 'cli') {
773
-            if ( ! $this->hasSnapshotData()) {
773
+            if (!$this->hasSnapshotData()) {
774 774
                 return;
775 775
             } // nothing changed
776 776
 
Please login to merge, or discard this patch.