@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | */ |
57 | 57 | public function onChanges(Config $xConfig) |
58 | 58 | { |
59 | - foreach($this->aListeners as $sListener) |
|
59 | + foreach ($this->aListeners as $sListener) |
|
60 | 60 | { |
61 | 61 | $this->di->g($sListener)->onChanges($xConfig); |
62 | 62 | } |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | */ |
68 | 68 | public function onChange(Config $xConfig, string $sName) |
69 | 69 | { |
70 | - foreach($this->aListeners as $sListener) |
|
70 | + foreach ($this->aListeners as $sListener) |
|
71 | 71 | { |
72 | 72 | $this->di->g($sListener)->onChange($xConfig, $sName); |
73 | 73 | } |
@@ -75,22 +75,22 @@ discard block |
||
75 | 75 | { |
76 | 76 | return $this->xConfigReader->read($sConfigFile); |
77 | 77 | } |
78 | - catch(YamlExtension $e) |
|
78 | + catch (YamlExtension $e) |
|
79 | 79 | { |
80 | 80 | $sMessage = $this->xTranslator->trans('errors.yaml.install'); |
81 | 81 | throw new SetupException($sMessage); |
82 | 82 | } |
83 | - catch(FileExtension $e) |
|
83 | + catch (FileExtension $e) |
|
84 | 84 | { |
85 | 85 | $sMessage = $this->xTranslator->trans('errors.file.extension', ['path' => $sConfigFile]); |
86 | 86 | throw new SetupException($sMessage); |
87 | 87 | } |
88 | - catch(FileAccess $e) |
|
88 | + catch (FileAccess $e) |
|
89 | 89 | { |
90 | 90 | $sMessage = $this->xTranslator->trans('errors.file.access', ['path' => $sConfigFile]); |
91 | 91 | throw new SetupException($sMessage); |
92 | 92 | } |
93 | - catch(FileContent $e) |
|
93 | + catch (FileContent $e) |
|
94 | 94 | { |
95 | 95 | $sMessage = $this->xTranslator->trans('errors.file.content', ['path' => $sConfigFile]); |
96 | 96 | throw new SetupException($sMessage); |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | // Call the config change listeners. |
116 | 116 | $this->xEventManager->onChanges($this->xConfig); |
117 | 117 | } |
118 | - catch(DataDepth $e) |
|
118 | + catch (DataDepth $e) |
|
119 | 119 | { |
120 | 120 | $sMessage = $this->xTranslator->trans('errors.data.depth', |
121 | 121 | ['key' => $e->sPrefix, 'depth' => $e->nDepth]); |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | { |
137 | 137 | try |
138 | 138 | { |
139 | - if(!$this->xConfig->setOptions($aOptions, $sKeys)) |
|
139 | + if (!$this->xConfig->setOptions($aOptions, $sKeys)) |
|
140 | 140 | { |
141 | 141 | return false; |
142 | 142 | } |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | $this->xEventManager->onChanges($this->xConfig); |
145 | 145 | return true; |
146 | 146 | } |
147 | - catch(DataDepth $e) |
|
147 | + catch (DataDepth $e) |
|
148 | 148 | { |
149 | 149 | $sMessage = $this->xTranslator->trans('errors.data.depth', |
150 | 150 | ['key' => $e->sPrefix, 'depth' => $e->nDepth]); |
@@ -219,7 +219,7 @@ discard block |
||
219 | 219 | { |
220 | 220 | return new Config($aOptions, $sKeys); |
221 | 221 | } |
222 | - catch(DataDepth $e) |
|
222 | + catch (DataDepth $e) |
|
223 | 223 | { |
224 | 224 | $sMessage = $this->xTranslator->trans('errors.data.depth', |
225 | 225 | ['key' => $e->sPrefix, 'depth' => $e->nDepth]); |
@@ -74,23 +74,19 @@ discard block |
||
74 | 74 | try |
75 | 75 | { |
76 | 76 | return $this->xConfigReader->read($sConfigFile); |
77 | - } |
|
78 | - catch(YamlExtension $e) |
|
77 | + } catch(YamlExtension $e) |
|
79 | 78 | { |
80 | 79 | $sMessage = $this->xTranslator->trans('errors.yaml.install'); |
81 | 80 | throw new SetupException($sMessage); |
82 | - } |
|
83 | - catch(FileExtension $e) |
|
81 | + } catch(FileExtension $e) |
|
84 | 82 | { |
85 | 83 | $sMessage = $this->xTranslator->trans('errors.file.extension', ['path' => $sConfigFile]); |
86 | 84 | throw new SetupException($sMessage); |
87 | - } |
|
88 | - catch(FileAccess $e) |
|
85 | + } catch(FileAccess $e) |
|
89 | 86 | { |
90 | 87 | $sMessage = $this->xTranslator->trans('errors.file.access', ['path' => $sConfigFile]); |
91 | 88 | throw new SetupException($sMessage); |
92 | - } |
|
93 | - catch(FileContent $e) |
|
89 | + } catch(FileContent $e) |
|
94 | 90 | { |
95 | 91 | $sMessage = $this->xTranslator->trans('errors.file.content', ['path' => $sConfigFile]); |
96 | 92 | throw new SetupException($sMessage); |
@@ -114,8 +110,7 @@ discard block |
||
114 | 110 | $this->xConfig->setOptions($this->read($sConfigFile), $sConfigSection); |
115 | 111 | // Call the config change listeners. |
116 | 112 | $this->xEventManager->onChanges($this->xConfig); |
117 | - } |
|
118 | - catch(DataDepth $e) |
|
113 | + } catch(DataDepth $e) |
|
119 | 114 | { |
120 | 115 | $sMessage = $this->xTranslator->trans('errors.data.depth', |
121 | 116 | ['key' => $e->sPrefix, 'depth' => $e->nDepth]); |
@@ -143,8 +138,7 @@ discard block |
||
143 | 138 | // Call the config change listeners. |
144 | 139 | $this->xEventManager->onChanges($this->xConfig); |
145 | 140 | return true; |
146 | - } |
|
147 | - catch(DataDepth $e) |
|
141 | + } catch(DataDepth $e) |
|
148 | 142 | { |
149 | 143 | $sMessage = $this->xTranslator->trans('errors.data.depth', |
150 | 144 | ['key' => $e->sPrefix, 'depth' => $e->nDepth]); |
@@ -218,8 +212,7 @@ discard block |
||
218 | 212 | try |
219 | 213 | { |
220 | 214 | return new Config($aOptions, $sKeys); |
221 | - } |
|
222 | - catch(DataDepth $e) |
|
215 | + } catch(DataDepth $e) |
|
223 | 216 | { |
224 | 217 | $sMessage = $this->xTranslator->trans('errors.data.depth', |
225 | 218 | ['key' => $e->sPrefix, 'depth' => $e->nDepth]); |
@@ -35,7 +35,7 @@ |
||
35 | 35 | public function onChange(Config $xConfig, string $sName) |
36 | 36 | { |
37 | 37 | // Set the library language any time the config is changed. |
38 | - if($sName === 'core.language') |
|
38 | + if ($sName === 'core.language') |
|
39 | 39 | { |
40 | 40 | $this->setLocale($xConfig->getOption('core.language')); |
41 | 41 | } |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | */ |
142 | 142 | public function has(string $sClass): bool |
143 | 143 | { |
144 | - if($this->xContainer != null && $this->xContainer->has($sClass)) |
|
144 | + if ($this->xContainer != null && $this->xContainer->has($sClass)) |
|
145 | 145 | { |
146 | 146 | return true; |
147 | 147 | } |
@@ -172,13 +172,13 @@ discard block |
||
172 | 172 | { |
173 | 173 | try |
174 | 174 | { |
175 | - if($this->xContainer != null && $this->xContainer->has($sClass)) |
|
175 | + if ($this->xContainer != null && $this->xContainer->has($sClass)) |
|
176 | 176 | { |
177 | 177 | return $this->xContainer->get($sClass); |
178 | 178 | } |
179 | 179 | return $this->offsetGet($sClass); |
180 | 180 | } |
181 | - catch(Exception|Throwable $e) |
|
181 | + catch (Exception | Throwable $e) |
|
182 | 182 | { |
183 | 183 | $xTranslator = $this->g(Translator::class); |
184 | 184 | $sMessage = $xTranslator->trans('errors.class.container', ['name' => $sClass]); |
@@ -238,22 +238,22 @@ discard block |
||
238 | 238 | */ |
239 | 239 | public function make($xClass) |
240 | 240 | { |
241 | - if(is_string($xClass)) |
|
241 | + if (is_string($xClass)) |
|
242 | 242 | { |
243 | 243 | $xClass = new ReflectionClass($xClass); // Create the reflection class instance |
244 | 244 | } |
245 | - if(!($xClass instanceof ReflectionClass)) |
|
245 | + if (!($xClass instanceof ReflectionClass)) |
|
246 | 246 | { |
247 | 247 | return null; |
248 | 248 | } |
249 | 249 | // Use the Reflection class to get the parameters of the constructor |
250 | - if(($constructor = $xClass->getConstructor()) === null) |
|
250 | + if (($constructor = $xClass->getConstructor()) === null) |
|
251 | 251 | { |
252 | 252 | return $xClass->newInstance(); |
253 | 253 | } |
254 | 254 | $parameters = $constructor->getParameters(); |
255 | 255 | $parameterInstances = []; |
256 | - foreach($parameters as $parameter) |
|
256 | + foreach ($parameters as $parameter) |
|
257 | 257 | { |
258 | 258 | // Get the parameter instance from the DI |
259 | 259 | $parameterInstances[] = $this->get($parameter->getClass()->getName()); |
@@ -177,8 +177,7 @@ |
||
177 | 177 | return $this->xContainer->get($sClass); |
178 | 178 | } |
179 | 179 | return $this->offsetGet($sClass); |
180 | - } |
|
181 | - catch(Exception|Throwable $e) |
|
180 | + } catch(Exception|Throwable $e) |
|
182 | 181 | { |
183 | 182 | $xTranslator = $this->g(Translator::class); |
184 | 183 | $sMessage = $xTranslator->trans('errors.class.container', ['name' => $sClass]); |
@@ -36,15 +36,15 @@ discard block |
||
36 | 36 | private function getCallableObjectOptions(array $aConfigOptions, array $aAnnotationOptions): array |
37 | 37 | { |
38 | 38 | $aOptions = []; |
39 | - foreach($aConfigOptions as $sNames => $aFunctionOptions) |
|
39 | + foreach ($aConfigOptions as $sNames => $aFunctionOptions) |
|
40 | 40 | { |
41 | 41 | $aFunctionNames = explode(',', $sNames); // Names are in comma-separated list. |
42 | - foreach($aFunctionNames as $sFunctionName) |
|
42 | + foreach ($aFunctionNames as $sFunctionName) |
|
43 | 43 | { |
44 | 44 | $aOptions[$sFunctionName] = array_merge($aOptions[$sFunctionName] ?? [], $aFunctionOptions); |
45 | 45 | } |
46 | 46 | } |
47 | - foreach($aAnnotationOptions as $sFunctionName => $aFunctionOptions) |
|
47 | + foreach ($aAnnotationOptions as $sFunctionName => $aFunctionOptions) |
|
48 | 48 | { |
49 | 49 | $aOptions[$sFunctionName] = array_merge($aOptions[$sFunctionName] ?? [], $aFunctionOptions); |
50 | 50 | } |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | $xAnnotationReader = $this->g(AnnotationReaderInterface::class); |
66 | 66 | [$bExcluded, $aAnnotationOptions, $aAnnotationProtected] = |
67 | 67 | $xAnnotationReader->getAttributes($sClassName, $xCallableObject->getPublicMethods($aProtectedMethods)); |
68 | - if($bExcluded) |
|
68 | + if ($bExcluded) |
|
69 | 69 | { |
70 | 70 | $xCallableObject->configure('excluded', true); |
71 | 71 | return; |
@@ -77,11 +77,11 @@ discard block |
||
77 | 77 | // Functions options |
78 | 78 | $aCallableOptions = []; |
79 | 79 | $aOptions = $this->getCallableObjectOptions($aOptions['functions'], $aAnnotationOptions); |
80 | - foreach($aOptions as $sFunctionName => $aFunctionOptions) |
|
80 | + foreach ($aOptions as $sFunctionName => $aFunctionOptions) |
|
81 | 81 | { |
82 | - foreach($aFunctionOptions as $sOptionName => $xOptionValue) |
|
82 | + foreach ($aFunctionOptions as $sOptionName => $xOptionValue) |
|
83 | 83 | { |
84 | - if(substr($sOptionName, 0, 2) !== '__') |
|
84 | + if (substr($sOptionName, 0, 2) !== '__') |
|
85 | 85 | { |
86 | 86 | // Options for javascript code. |
87 | 87 | $aCallableOptions[$sFunctionName][$sOptionName] = $xOptionValue; |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | $sReflectionClass = $sClassName . '_ReflectionClass'; |
111 | 111 | |
112 | 112 | // Make sure the registered class exists |
113 | - if(isset($aOptions['include'])) |
|
113 | + if (isset($aOptions['include'])) |
|
114 | 114 | { |
115 | 115 | require_once($aOptions['include']); |
116 | 116 | } |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | { |
120 | 120 | $this->val($sReflectionClass, new ReflectionClass($sClassName)); |
121 | 121 | } |
122 | - catch(ReflectionException $e) |
|
122 | + catch (ReflectionException $e) |
|
123 | 123 | { |
124 | 124 | $xTranslator = $this->g(Translator::class); |
125 | 125 | $sMessage = $xTranslator->trans('errors.class.invalid', ['name' => $sClassName]); |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | $this->set($sClassName, function($c) use($sClassName, $sReflectionClass) { |
146 | 146 | $xRegisteredObject = $this->make($c->g($sReflectionClass)); |
147 | 147 | // Initialize the object |
148 | - if($xRegisteredObject instanceof CallableClass) |
|
148 | + if ($xRegisteredObject instanceof CallableClass) |
|
149 | 149 | { |
150 | 150 | // Set the protected attributes of the object |
151 | 151 | $cSetter = function($c, $sClassName) { |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | |
159 | 159 | // Run the callback for class initialisation |
160 | 160 | $aCallbacks = $c->g(CallbackManager::class)->getInitCallbacks(); |
161 | - foreach($aCallbacks as $xCallback) |
|
161 | + foreach ($aCallbacks as $xCallback) |
|
162 | 162 | { |
163 | 163 | call_user_func($xCallback, $xRegisteredObject); |
164 | 164 | } |
@@ -118,8 +118,7 @@ |
||
118 | 118 | try |
119 | 119 | { |
120 | 120 | $this->val($sReflectionClass, new ReflectionClass($sClassName)); |
121 | - } |
|
122 | - catch(ReflectionException $e) |
|
121 | + } catch(ReflectionException $e) |
|
123 | 122 | { |
124 | 123 | $xTranslator = $this->g(Translator::class); |
125 | 124 | $sMessage = $xTranslator->trans('errors.class.invalid', ['name' => $sClassName]); |
@@ -56,7 +56,7 @@ |
||
56 | 56 | { |
57 | 57 | public function random(int $nLength): string |
58 | 58 | { |
59 | - return bin2hex(random_bytes((int)($nLength / 2))); |
|
59 | + return bin2hex(random_bytes((int) ($nLength / 2))); |
|
60 | 60 | } |
61 | 61 | }; |
62 | 62 | }); |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | }; |
31 | 31 | }); |
32 | 32 | |
33 | - if(class_exists(AnnotationReader::class)) |
|
33 | + if (class_exists(AnnotationReader::class)) |
|
34 | 34 | { |
35 | 35 | $sEventListenerKey = AnnotationReader::class . '\\ConfigListener'; |
36 | 36 | // The annotation package is installed, register the real annotation reader, |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | { |
41 | 41 | public function onChanges(Config $xConfig) |
42 | 42 | { |
43 | - if($xConfig->getOption('core.annotations.on')) |
|
43 | + if ($xConfig->getOption('core.annotations.on')) |
|
44 | 44 | { |
45 | 45 | AnnotationReader::register(jaxon()->di()); |
46 | 46 | } |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | |
49 | 49 | public function onChange(Config $xConfig, string $sName) |
50 | 50 | { |
51 | - if($sName === 'core.annotations.on' && $xConfig->getOption('core.annotations.on')) |
|
51 | + if ($sName === 'core.annotations.on' && $xConfig->getOption('core.annotations.on')) |
|
52 | 52 | { |
53 | 53 | AnnotationReader::register(jaxon()->di()); |
54 | 54 | } |
@@ -105,9 +105,9 @@ |
||
105 | 105 | */ |
106 | 106 | public function addParameters(array $aParameters): JsCall |
107 | 107 | { |
108 | - foreach($aParameters as $xParameter) |
|
108 | + foreach ($aParameters as $xParameter) |
|
109 | 109 | { |
110 | - if($xParameter instanceof JsCall) |
|
110 | + if ($xParameter instanceof JsCall) |
|
111 | 111 | { |
112 | 112 | $this->addParameter(Parameter::JS_VALUE, 'function(){' . $xParameter->getScript() . ';}'); |
113 | 113 | } |
@@ -159,8 +159,7 @@ |
||
159 | 159 | if($xParameter instanceof JsCall) |
160 | 160 | { |
161 | 161 | $this->addParameter(Parameter::JS_VALUE, 'function(){' . $xParameter->getScript() . ';}'); |
162 | - } |
|
163 | - else |
|
162 | + } else |
|
164 | 163 | { |
165 | 164 | $this->pushParameter(Parameter::make($xParameter)); |
166 | 165 | } |
@@ -79,10 +79,10 @@ discard block |
||
79 | 79 | */ |
80 | 80 | private function _makeUniqueJsVar(ParameterInterface $xParameter): ParameterInterface |
81 | 81 | { |
82 | - if($xParameter instanceof DomSelector) |
|
82 | + if ($xParameter instanceof DomSelector) |
|
83 | 83 | { |
84 | 84 | $sParameterStr = $xParameter->getScript(); |
85 | - if(!isset($this->aVariables[$sParameterStr])) |
|
85 | + if (!isset($this->aVariables[$sParameterStr])) |
|
86 | 86 | { |
87 | 87 | // The value is not yet defined. A new variable is created. |
88 | 88 | $sVarName = 'jxnVar' . $this->nVarId; |
@@ -109,18 +109,18 @@ discard block |
||
109 | 109 | */ |
110 | 110 | private function makePhrase(array $aArgs): string |
111 | 111 | { |
112 | - if(empty($aArgs)) |
|
112 | + if (empty($aArgs)) |
|
113 | 113 | { |
114 | 114 | return ''; |
115 | 115 | } |
116 | 116 | // The first array entry is the message. |
117 | 117 | $sPhrase = array_shift($aArgs); |
118 | - if(empty($aArgs)) |
|
118 | + if (empty($aArgs)) |
|
119 | 119 | { |
120 | 120 | return $sPhrase; |
121 | 121 | } |
122 | 122 | $nParamId = 1; |
123 | - foreach($aArgs as &$xParameter) |
|
123 | + foreach ($aArgs as &$xParameter) |
|
124 | 124 | { |
125 | 125 | $xParameter = $this->_makeUniqueJsVar($xParameter); |
126 | 126 | $xParameter = "'$nParamId':" . $xParameter->getScript(); |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | */ |
138 | 138 | private function makeMessage(): string |
139 | 139 | { |
140 | - if(!($sPhrase = $this->makePhrase($this->aMessageArgs))) |
|
140 | + if (!($sPhrase = $this->makePhrase($this->aMessageArgs))) |
|
141 | 141 | { |
142 | 142 | return ''; |
143 | 143 | } |
@@ -166,23 +166,22 @@ discard block |
||
166 | 166 | // This array will avoid declaring multiple variables with the same value. |
167 | 167 | // The array key is the variable value, while the array value is the variable name. |
168 | 168 | $this->aVariables = []; // Array of local variables. |
169 | - foreach($this->aParameters as &$xParameter) |
|
169 | + foreach ($this->aParameters as &$xParameter) |
|
170 | 170 | { |
171 | 171 | $xParameter = $this->_makeUniqueJsVar($xParameter); |
172 | 172 | } |
173 | 173 | |
174 | 174 | $sMessageScript = $this->makeMessage(); |
175 | 175 | $sScript = parent::getScript(); |
176 | - if($this->sCondition === '__confirm__') |
|
176 | + if ($this->sCondition === '__confirm__') |
|
177 | 177 | { |
178 | 178 | $sConfirmPhrase = $this->makePhrase($this->aConfirmArgs); |
179 | 179 | $sScript = $this->xDialogLibraryManager->getQuestionLibrary() |
180 | 180 | ->confirm($sConfirmPhrase, $sScript, $sMessageScript); |
181 | 181 | } |
182 | - elseif($this->sCondition !== '') |
|
182 | + elseif ($this->sCondition !== '') |
|
183 | 183 | { |
184 | - $sScript = empty($sMessageScript) ? 'if(' . $this->sCondition . '){' . $sScript . ';}' : |
|
185 | - 'if(' . $this->sCondition . '){' . $sScript . ';}else{' . $sMessageScript . ';}'; |
|
184 | + $sScript = empty($sMessageScript) ? 'if(' . $this->sCondition . '){' . $sScript . ';}' : 'if(' . $this->sCondition . '){' . $sScript . ';}else{' . $sMessageScript . ';}'; |
|
186 | 185 | } |
187 | 186 | return $this->sVars . $sScript; |
188 | 187 | } |
@@ -194,9 +193,9 @@ discard block |
||
194 | 193 | */ |
195 | 194 | public function hasPageNumber(): bool |
196 | 195 | { |
197 | - foreach($this->aParameters as $xParameter) |
|
196 | + foreach ($this->aParameters as $xParameter) |
|
198 | 197 | { |
199 | - if($xParameter->getType() === Parameter::PAGE_NUMBER) |
|
198 | + if ($xParameter->getType() === Parameter::PAGE_NUMBER) |
|
200 | 199 | { |
201 | 200 | return true; |
202 | 201 | } |
@@ -214,9 +213,9 @@ discard block |
||
214 | 213 | public function setPageNumber(int $nPageNumber): Call |
215 | 214 | { |
216 | 215 | // Set the value of the Parameter::PAGE_NUMBER parameter |
217 | - foreach($this->aParameters as $xParameter) |
|
216 | + foreach ($this->aParameters as $xParameter) |
|
218 | 217 | { |
219 | - if($xParameter->getType() === Parameter::PAGE_NUMBER) |
|
218 | + if ($xParameter->getType() === Parameter::PAGE_NUMBER) |
|
220 | 219 | { |
221 | 220 | $xParameter->setValue($nPageNumber); |
222 | 221 | break; |
@@ -237,7 +236,7 @@ discard block |
||
237 | 236 | public function pages(int $nCurrentPage, int $nItemsPerPage, int $nItemsTotal): array |
238 | 237 | { |
239 | 238 | // Append the page number to the parameter list, if not yet given. |
240 | - if(!$this->hasPageNumber()) |
|
239 | + if (!$this->hasPageNumber()) |
|
241 | 240 | { |
242 | 241 | $this->addParameter(Parameter::PAGE_NUMBER, 0); |
243 | 242 | } |
@@ -256,7 +255,7 @@ discard block |
||
256 | 255 | public function paginate(int $nCurrentPage, int $nItemsPerPage, int $nItemsTotal): Paginator |
257 | 256 | { |
258 | 257 | // Append the page number to the parameter list, if not yet given. |
259 | - if(!$this->hasPageNumber()) |
|
258 | + if (!$this->hasPageNumber()) |
|
260 | 259 | { |
261 | 260 | $this->addParameter(Parameter::PAGE_NUMBER, 0); |
262 | 261 | } |
@@ -89,8 +89,7 @@ discard block |
||
89 | 89 | $this->aVariables[$sParameterStr] = $sVarName; |
90 | 90 | $this->sVars .= "$sVarName=$xParameter;"; |
91 | 91 | $this->nVarId++; |
92 | - } |
|
93 | - else |
|
92 | + } else |
|
94 | 93 | { |
95 | 94 | // The value is already defined. The corresponding variable is assigned. |
96 | 95 | $sVarName = $this->aVariables[$sParameterStr]; |
@@ -178,8 +177,7 @@ discard block |
||
178 | 177 | $sConfirmPhrase = $this->makePhrase($this->aConfirmArgs); |
179 | 178 | $sScript = $this->xDialogLibraryManager->getQuestionLibrary() |
180 | 179 | ->confirm($sConfirmPhrase, $sScript, $sMessageScript); |
181 | - } |
|
182 | - elseif($this->sCondition !== '') |
|
180 | + } elseif($this->sCondition !== '') |
|
183 | 181 | { |
184 | 182 | $sScript = empty($sMessageScript) ? 'if(' . $this->sCondition . '){' . $sScript . ';}' : |
185 | 183 | 'if(' . $this->sCondition . '){' . $sScript . ';}else{' . $sMessageScript . ';}'; |