@@ -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 | } |
@@ -6,7 +6,8 @@ discard block |
||
| 6 | 6 | if(<?php echo $sJsClass ?> === undefined) { |
| 7 | 7 | <?php echo $sJsClass ?> = {}; |
| 8 | 8 | } |
| 9 | -<?php else: ?> |
|
| 9 | +<?php else { |
|
| 10 | + : ?> |
|
| 10 | 11 | <?php echo $sJsClass ?> = {}; |
| 11 | 12 | <?php endif ?> |
| 12 | 13 | <?php foreach($this->aMethods as $aMethod): ?> |
@@ -17,3 +18,4 @@ discard block |
||
| 17 | 18 | echo $sKey ?>: <?php echo $sValue ?><?php endforeach ?> }); |
| 18 | 19 | }; |
| 19 | 20 | <?php endforeach; |
| 21 | +} |
|
@@ -199,8 +199,7 @@ |
||
| 199 | 199 | { |
| 200 | 200 | return $this->xAppContainer != null && $this->xAppContainer->has($sClass) ? |
| 201 | 201 | $this->xAppContainer->get($sClass) : $this->xLibContainer->offsetGet($sClass); |
| 202 | - } |
|
| 203 | - catch(Exception|Throwable $e) |
|
| 202 | + } catch(Exception|Throwable $e) |
|
| 204 | 203 | { |
| 205 | 204 | $xLogger = $this->g(LoggerInterface::class); |
| 206 | 205 | $xTranslator = $this->g(Translator::class); |
@@ -214,8 +214,7 @@ discard block |
||
| 214 | 214 | return $this->make($this->get($this->getReflectionClassKey($sClassName))); |
| 215 | 215 | }); |
| 216 | 216 | } |
| 217 | - } |
|
| 218 | - catch(ReflectionException $e) |
|
| 217 | + } catch(ReflectionException $e) |
|
| 219 | 218 | { |
| 220 | 219 | throw new SetupException($this->di->g(Translator::class) |
| 221 | 220 | ->trans('errors.class.invalid', ['name' => $sClassName])); |
@@ -240,8 +239,7 @@ discard block |
||
| 240 | 239 | if($aOptions !== null) |
| 241 | 240 | { |
| 242 | 241 | $this->registerComponent($sClassName, $aOptions); |
| 243 | - } |
|
| 244 | - else // if(!isset($this->aComponents[$sClassName])) |
|
| 242 | + } else // if(!isset($this->aComponents[$sClassName])) |
|
| 245 | 243 | { |
| 246 | 244 | // The component was not found in a registered namespace. We need to parse all |
| 247 | 245 | // the directories to be able to find a component registered without a namespace. |
@@ -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]); |
@@ -85,8 +85,7 @@ discard block |
||
| 85 | 85 | if(is_string($xOptions)) |
| 86 | 86 | { |
| 87 | 87 | $xOptions = ['include' => $xOptions]; |
| 88 | - } |
|
| 89 | - elseif(!is_array($xOptions)) |
|
| 88 | + } elseif(!is_array($xOptions)) |
|
| 90 | 89 | { |
| 91 | 90 | throw new SetupException($this->xTranslator->trans('errors.objects.invalid-declaration')); |
| 92 | 91 | } |
@@ -262,8 +261,7 @@ discard block |
||
| 262 | 261 | |
| 263 | 262 | // Unable to find the requested class or method |
| 264 | 263 | $this->throwException('', 'errors.objects.excluded', $aErrorParams); |
| 265 | - } |
|
| 266 | - catch(ReflectionException|SetupException $e) |
|
| 264 | + } catch(ReflectionException|SetupException $e) |
|
| 267 | 265 | { |
| 268 | 266 | // Unable to execute the requested class or method |
| 269 | 267 | $this->throwException($e->getMessage(), $sError, $aErrorParams); |
@@ -226,8 +226,7 @@ |
||
| 226 | 226 | if(is_array($xMethodToCall)) |
| 227 | 227 | { |
| 228 | 228 | $aHookMethods[$sCalledMethod] = array_merge($aHookMethods[$sCalledMethod], $xMethodToCall); |
| 229 | - } |
|
| 230 | - elseif(is_string($xMethodToCall)) |
|
| 229 | + } elseif(is_string($xMethodToCall)) |
|
| 231 | 230 | { |
| 232 | 231 | $aHookMethods[$sCalledMethod][] = $xMethodToCall; |
| 233 | 232 | } |
@@ -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', |