@@ -185,7 +185,7 @@ discard block |
||
| 185 | 185 | */ |
| 186 | 186 | public function timezoneConfigure(): void |
| 187 | 187 | { |
| 188 | - $timezone = $this->mikoPBXConfig->getGeneralSettings('PBXTimezone');; |
|
| 188 | + $timezone = $this->mikoPBXConfig->getGeneralSettings('PBXTimezone'); ; |
|
| 189 | 189 | if (file_exists('/etc/TZ')) { |
| 190 | 190 | unlink("/etc/TZ"); |
| 191 | 191 | } |
@@ -194,7 +194,7 @@ discard block |
||
| 194 | 194 | } |
| 195 | 195 | if ($timezone) { |
| 196 | 196 | $zone_file = "/usr/share/zoneinfo/{$timezone}"; |
| 197 | - if ( ! file_exists($zone_file)) { |
|
| 197 | + if (!file_exists($zone_file)) { |
|
| 198 | 198 | return; |
| 199 | 199 | } |
| 200 | 200 | $cpPath = Util::which('cp'); |
@@ -270,6 +270,6 @@ discard block |
||
| 270 | 270 | $workerSafeScriptsPath = Util::getFilePathByClassName(WorkerSafeScriptsCore::class); |
| 271 | 271 | $phpPath = Util::which('php'); |
| 272 | 272 | $WorkerSafeScripts = "{$phpPath} -f {$workerSafeScriptsPath} restart > /dev/null 2> /dev/null"; |
| 273 | - Util::mwExecBg($WorkerSafeScripts,'/dev/null', 1); |
|
| 273 | + Util::mwExecBg($WorkerSafeScripts, '/dev/null', 1); |
|
| 274 | 274 | } |
| 275 | 275 | } |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | |
| 47 | 47 | $this->registerModulesProcessors(); |
| 48 | 48 | |
| 49 | - while ($this->needRestart===false) { |
|
| 49 | + while ($this->needRestart === false) { |
|
| 50 | 50 | try { |
| 51 | 51 | $client->wait(); |
| 52 | 52 | } catch (\Exception $e) { |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | } catch (\Exception $exception) { |
| 121 | 121 | $res = new PBXApiResult(); |
| 122 | 122 | $res->processor = __METHOD__; |
| 123 | - $res->messages[] = 'Exception on WorkerApiCommands - ' . $exception->getMessage(); |
|
| 123 | + $res->messages[] = 'Exception on WorkerApiCommands - '.$exception->getMessage(); |
|
| 124 | 124 | } |
| 125 | 125 | $message->reply(json_encode($res->getResult())); |
| 126 | 126 | |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | && $res->data['needRestartWorkers'] |
| 130 | 130 | ) { |
| 131 | 131 | System::restartAllWorkers(); |
| 132 | - $this->needRestart=true; |
|
| 132 | + $this->needRestart = true; |
|
| 133 | 133 | } |
| 134 | 134 | } |
| 135 | 135 | |
@@ -268,7 +268,7 @@ discard block |
||
| 268 | 268 | $data['body'] = base64_decode($data['body']); |
| 269 | 269 | } |
| 270 | 270 | $result = Notifications::sendMail($data['email'], $data['subject'], $data['body']); |
| 271 | - if ($result===true){ |
|
| 271 | + if ($result === true) { |
|
| 272 | 272 | $res->success = true; |
| 273 | 273 | } else { |
| 274 | 274 | $res->success = false; |
@@ -366,7 +366,7 @@ discard block |
||
| 366 | 366 | break; |
| 367 | 367 | case 'uninstallModule': |
| 368 | 368 | $moduleUniqueID = $request['data']['uniqid']; |
| 369 | - $keepSettings = $request['data']['keepSettings']==='true'; |
|
| 369 | + $keepSettings = $request['data']['keepSettings'] === 'true'; |
|
| 370 | 370 | $res = FilesManagementProcessor::uninstallModule($moduleUniqueID, $keepSettings); |
| 371 | 371 | break; |
| 372 | 372 | default: |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | use ReflectionClass as ReflectionClassAlias; |
| 16 | 16 | |
| 17 | 17 | abstract class ConfigClass extends Injectable implements SystemConfigInterface, AsteriskConfigInterface, |
| 18 | - RestAPIConfigInterface |
|
| 18 | + RestAPIConfigInterface |
|
| 19 | 19 | { |
| 20 | 20 | |
| 21 | 21 | /** |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | if (count($partsOfNameSpace) === 3 && $partsOfNameSpace[0] === 'Modules') { |
| 85 | 85 | $modulesDir = $this->config->path('core.modulesDir'); |
| 86 | 86 | $this->moduleUniqueId = $partsOfNameSpace[1]; |
| 87 | - $this->moduleDir = $modulesDir . '/' . $this->moduleUniqueId; |
|
| 87 | + $this->moduleDir = $modulesDir.'/'.$this->moduleUniqueId; |
|
| 88 | 88 | } |
| 89 | 89 | |
| 90 | 90 | $this->messages = []; |
@@ -117,13 +117,13 @@ discard block |
||
| 117 | 117 | if (empty($addition)) { |
| 118 | 118 | return $result; |
| 119 | 119 | } |
| 120 | - if ( ! empty($this->moduleUniqueId) && ConfigClass::ID_CONFIG_CLASS !== $this->moduleUniqueId) { |
|
| 121 | - $result = PHP_EOL . '; ***** BEGIN BY ' . $this->moduleUniqueId . PHP_EOL; |
|
| 120 | + if (!empty($this->moduleUniqueId) && ConfigClass::ID_CONFIG_CLASS !== $this->moduleUniqueId) { |
|
| 121 | + $result = PHP_EOL.'; ***** BEGIN BY '.$this->moduleUniqueId.PHP_EOL; |
|
| 122 | 122 | $result .= $addition; |
| 123 | 123 | if (substr($addition, -1) !== "\t") { |
| 124 | 124 | $result .= "\t"; |
| 125 | 125 | } |
| 126 | - $result .= PHP_EOL . '; ***** END BY ' . $this->moduleUniqueId . PHP_EOL; |
|
| 126 | + $result .= PHP_EOL.'; ***** END BY '.$this->moduleUniqueId.PHP_EOL; |
|
| 127 | 127 | } else { |
| 128 | 128 | $result .= $addition; |
| 129 | 129 | } |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | */ |
| 138 | 138 | protected function echoGenerateConfig(): void |
| 139 | 139 | { |
| 140 | - if ($this->booting === true && ! empty($this->description)) { |
|
| 140 | + if ($this->booting === true && !empty($this->description)) { |
|
| 141 | 141 | echo " |- generate config {$this->description}... "; |
| 142 | 142 | } |
| 143 | 143 | } |
@@ -154,7 +154,7 @@ discard block |
||
| 154 | 154 | */ |
| 155 | 155 | protected function echoDone(): void |
| 156 | 156 | { |
| 157 | - if ($this->booting === true && ! empty($this->description)) { |
|
| 157 | + if ($this->booting === true && !empty($this->description)) { |
|
| 158 | 158 | echo "\033[32;1mdone\033[0m \n"; |
| 159 | 159 | } |
| 160 | 160 | } |