@@ -258,8 +258,7 @@ |
||
| 258 | 258 | } |
| 259 | 259 | |
| 260 | 260 | return $this->xMetadata; |
| 261 | - } |
|
| 262 | - catch(Exception|Error $e) |
|
| 261 | + } catch(Exception|Error $e) |
|
| 263 | 262 | { |
| 264 | 263 | throw new SetupException($e->getMessage()); |
| 265 | 264 | } |
@@ -214,8 +214,7 @@ |
||
| 214 | 214 | if($this->bOnConfirm) |
| 215 | 215 | { |
| 216 | 216 | $this->aConfirmCommands[] = $xCommand; |
| 217 | - } |
|
| 218 | - else |
|
| 217 | + } else |
|
| 219 | 218 | { |
| 220 | 219 | $this->aCommands[] = $xCommand; |
| 221 | 220 | } |
@@ -218,8 +218,7 @@ |
||
| 218 | 218 | { |
| 219 | 219 | // A string is supposed to be the path to a config file. |
| 220 | 220 | $aLibOptions = $this->xConfigManager->read($aLibOptions); |
| 221 | - } |
|
| 222 | - elseif(!is_array($aLibOptions)) |
|
| 221 | + } elseif(!is_array($aLibOptions)) |
|
| 223 | 222 | { |
| 224 | 223 | // Otherwise, anything else than an array is not accepted. |
| 225 | 224 | $sMessage = $this->xTranslator->trans('errors.register.invalid', ['name' => $sClassName]); |
@@ -92,8 +92,7 @@ discard block |
||
| 92 | 92 | if(is_string($xOptions)) |
| 93 | 93 | { |
| 94 | 94 | $xOptions = ['include' => $xOptions]; |
| 95 | - } |
|
| 96 | - elseif(!is_array($xOptions)) |
|
| 95 | + } elseif(!is_array($xOptions)) |
|
| 97 | 96 | { |
| 98 | 97 | throw new SetupException($this->xTranslator->trans('errors.objects.invalid-declaration')); |
| 99 | 98 | } |
@@ -236,8 +235,7 @@ discard block |
||
| 236 | 235 | { |
| 237 | 236 | /** @var CallableFunction */ |
| 238 | 237 | $xFunction = $this->getCallable($sRequestedFunction); |
| 239 | - } |
|
| 240 | - catch(Exception $e) |
|
| 238 | + } catch(Exception $e) |
|
| 241 | 239 | { |
| 242 | 240 | // Unable to find the requested function |
| 243 | 241 | $this->throwException($e, $this->xTranslator->trans('errors.functions.invalid', |
@@ -246,8 +244,7 @@ discard block |
||
| 246 | 244 | try |
| 247 | 245 | { |
| 248 | 246 | $xFunction->call($this->xTarget->args()); |
| 249 | - } |
|
| 250 | - catch(Exception $e) |
|
| 247 | + } catch(Exception $e) |
|
| 251 | 248 | { |
| 252 | 249 | // Unable to execute the requested function |
| 253 | 250 | $this->throwException($e, $this->xTranslator->trans('errors.functions.call', |
@@ -69,23 +69,19 @@ discard block |
||
| 69 | 69 | try |
| 70 | 70 | { |
| 71 | 71 | return $this->xConfigReader->read($sConfigFile); |
| 72 | - } |
|
| 73 | - catch(YamlExtension $e) |
|
| 72 | + } catch(YamlExtension $e) |
|
| 74 | 73 | { |
| 75 | 74 | $sMessage = $this->xTranslator->trans('errors.yaml.install'); |
| 76 | 75 | throw new SetupException($sMessage); |
| 77 | - } |
|
| 78 | - catch(FileExtension $e) |
|
| 76 | + } catch(FileExtension $e) |
|
| 79 | 77 | { |
| 80 | 78 | $sMessage = $this->xTranslator->trans('errors.file.extension', ['path' => $sConfigFile]); |
| 81 | 79 | throw new SetupException($sMessage); |
| 82 | - } |
|
| 83 | - catch(FileAccess $e) |
|
| 80 | + } catch(FileAccess $e) |
|
| 84 | 81 | { |
| 85 | 82 | $sMessage = $this->xTranslator->trans('errors.file.access', ['path' => $sConfigFile]); |
| 86 | 83 | throw new SetupException($sMessage); |
| 87 | - } |
|
| 88 | - catch(FileContent $e) |
|
| 84 | + } catch(FileContent $e) |
|
| 89 | 85 | { |
| 90 | 86 | $sMessage = $this->xTranslator->trans('errors.file.content', ['path' => $sConfigFile]); |
| 91 | 87 | throw new SetupException($sMessage); |
@@ -110,8 +106,7 @@ discard block |
||
| 110 | 106 | ->setOptions($this->xLibConfig, $this->read($sConfigFile), $sConfigSection); |
| 111 | 107 | // Call the config change listeners. |
| 112 | 108 | $this->xEventManager->libConfigChanged($this->xLibConfig, ''); |
| 113 | - } |
|
| 114 | - catch(DataDepth $e) |
|
| 109 | + } catch(DataDepth $e) |
|
| 115 | 110 | { |
| 116 | 111 | $sMessage = $this->xTranslator->trans('errors.data.depth', [ |
| 117 | 112 | 'key' => $e->sPrefix, |
@@ -139,8 +134,7 @@ discard block |
||
| 139 | 134 | // Call the config change listeners. |
| 140 | 135 | $this->xEventManager->libConfigChanged($this->xLibConfig, ''); |
| 141 | 136 | return $this->xLibConfig->changed(); |
| 142 | - } |
|
| 143 | - catch(DataDepth $e) |
|
| 137 | + } catch(DataDepth $e) |
|
| 144 | 138 | { |
| 145 | 139 | $sMessage = $this->xTranslator->trans('errors.data.depth', [ |
| 146 | 140 | 'key' => $e->sPrefix, |
@@ -246,8 +240,7 @@ discard block |
||
| 246 | 240 | // Call the config change listeners. |
| 247 | 241 | $this->xEventManager->appConfigChanged($this->xAppConfig, ''); |
| 248 | 242 | return $this->xAppConfig->changed(); |
| 249 | - } |
|
| 250 | - catch(DataDepth $e) |
|
| 243 | + } catch(DataDepth $e) |
|
| 251 | 244 | { |
| 252 | 245 | $sMessage = $this->xTranslator->trans('errors.data.depth', [ |
| 253 | 246 | 'key' => $e->sPrefix, |
@@ -296,8 +289,7 @@ discard block |
||
| 296 | 289 | try |
| 297 | 290 | { |
| 298 | 291 | return $this->xConfigSetter->newConfig($aOptions, $sNamePrefix); |
| 299 | - } |
|
| 300 | - catch(DataDepth $e) |
|
| 292 | + } catch(DataDepth $e) |
|
| 301 | 293 | { |
| 302 | 294 | $sMessage = $this->xTranslator->trans('errors.data.depth', [ |
| 303 | 295 | 'key' => $e->sPrefix, |
@@ -142,8 +142,7 @@ |
||
| 142 | 142 | { |
| 143 | 143 | $this->xResponseManager->error($e->getMessage()); |
| 144 | 144 | $this->xCallbackManager->onInvalid($e); |
| 145 | - } |
|
| 146 | - catch(Exception $e) |
|
| 145 | + } catch(Exception $e) |
|
| 147 | 146 | { |
| 148 | 147 | $this->xResponseManager->error($e->getMessage()); |
| 149 | 148 | $this->xCallbackManager->onError($e); |
@@ -63,8 +63,10 @@ |
||
| 63 | 63 | |
| 64 | 64 | interface TestInterface |
| 65 | 65 | { |
| 66 | - public function do(); |
|
| 67 | -} |
|
| 66 | + public function do { |
|
| 67 | + (); |
|
| 68 | + } |
|
| 69 | + } |
|
| 68 | 70 | |
| 69 | 71 | class ClassWithInterface implements TestInterface |
| 70 | 72 | { |
@@ -60,8 +60,7 @@ |
||
| 60 | 60 | try |
| 61 | 61 | { |
| 62 | 62 | $xDialog->registerLibrary($sClass, $sClass::NAME); |
| 63 | - } |
|
| 64 | - catch(SetupException $_){} |
|
| 63 | + } catch(SetupException $_){} |
|
| 65 | 64 | } |
| 66 | 65 | |
| 67 | 66 | return $xDialog; |
@@ -293,10 +293,12 @@ |
||
| 293 | 293 | $aLibraries = $this->xConfigManager->getAppOption('dialogs.lib.use', []); |
| 294 | 294 | foreach($aLibraries as $sLibraryName) |
| 295 | 295 | { |
| 296 | - if(isset($this->aLibraries[$sLibraryName])) // Make sure the library exists |
|
| 296 | + if(isset($this->aLibraries[$sLibraryName])) { |
|
| 297 | + // Make sure the library exists |
|
| 297 | 298 | { |
| 298 | 299 | $this->aLibraries[$sLibraryName]['used'] = true; |
| 299 | 300 | } |
| 301 | + } |
|
| 300 | 302 | } |
| 301 | 303 | } |
| 302 | 304 | |