@@ -106,7 +106,7 @@ |
||
| 106 | 106 | } catch (Error $exception) { |
| 107 | 107 | $res = new PBXApiResult(); |
| 108 | 108 | $res->processor = __METHOD__; |
| 109 | - $res->messages[] = 'Exception on WorkerApiCommands - ' . $exception->getMessage(); |
|
| 109 | + $res->messages[] = 'Exception on WorkerApiCommands - '.$exception->getMessage(); |
|
| 110 | 110 | } |
| 111 | 111 | $message->reply(json_encode($res->getResult())); |
| 112 | 112 | $this->checkNeedReload($res->data); |
@@ -148,7 +148,7 @@ discard block |
||
| 148 | 148 | PBXConfModulesProvider::recreateModulesProvider(); |
| 149 | 149 | $res->data = $moduleStateProcessor->getMessages(); |
| 150 | 150 | $res->data['needRestartWorkers'] = true; //TODO:: Проверить надо ли это |
| 151 | - $res->success = true; |
|
| 151 | + $res->success = true; |
|
| 152 | 152 | } |
| 153 | 153 | break; |
| 154 | 154 | case 'disableModule': |
@@ -161,7 +161,7 @@ discard block |
||
| 161 | 161 | PBXConfModulesProvider::recreateModulesProvider(); |
| 162 | 162 | $res->data = $moduleStateProcessor->getMessages(); |
| 163 | 163 | $res->data['needRestartWorkers'] = true; //TODO:: Проверить надо ли это |
| 164 | - $res->success = true; |
|
| 164 | + $res->success = true; |
|
| 165 | 165 | } |
| 166 | 166 | break; |
| 167 | 167 | case 'uninstallModule': |
@@ -195,14 +195,14 @@ discard block |
||
| 195 | 195 | $res->data['message'] = 'In progress...'; |
| 196 | 196 | |
| 197 | 197 | |
| 198 | - if ( ! file_exists($tempFilename)) { |
|
| 198 | + if (!file_exists($tempFilename)) { |
|
| 199 | 199 | $res->success = false; |
| 200 | 200 | $res->messages[] = "Update file '{$tempFilename}' not found."; |
| 201 | 201 | |
| 202 | 202 | return $res; |
| 203 | 203 | } |
| 204 | 204 | |
| 205 | - if ( ! file_exists('/var/etc/cfdevice')) { |
|
| 205 | + if (!file_exists('/var/etc/cfdevice')) { |
|
| 206 | 206 | $res->success = false; |
| 207 | 207 | $res->messages[] = "The system is not installed"; |
| 208 | 208 | |
@@ -76,7 +76,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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]; |