@@ -17,7 +17,7 @@ |
||
17 | 17 | /** |
18 | 18 | * @var array The default config options |
19 | 19 | */ |
20 | - protected $aConfig = [ |
|
20 | + protected $aConfig = [ |
|
21 | 21 | 'core' => [ |
22 | 22 | 'version' => Jaxon::VERSION, |
23 | 23 | 'language' => 'en', |
@@ -57,8 +57,7 @@ |
||
57 | 57 | public function appendCommands(array $aCommands, bool $bBefore = false) |
58 | 58 | { |
59 | 59 | $this->aCommands = ($bBefore) ? |
60 | - array_merge($aCommands, $this->aCommands) : |
|
61 | - array_merge($this->aCommands, $aCommands); |
|
60 | + array_merge($aCommands, $this->aCommands) : array_merge($this->aCommands, $aCommands); |
|
62 | 61 | } |
63 | 62 | |
64 | 63 | /** |
@@ -140,7 +140,7 @@ |
||
140 | 140 | */ |
141 | 141 | public function bag(string $sName): DataBagContext |
142 | 142 | { |
143 | - return $this->plugin('bags')->bag($sName);; |
|
143 | + return $this->plugin('bags')->bag($sName); ; |
|
144 | 144 | } |
145 | 145 | |
146 | 146 | /** |
@@ -173,8 +173,7 @@ |
||
173 | 173 | */ |
174 | 174 | public function getContentType(): string |
175 | 175 | { |
176 | - return empty($this->sCharacterEncoding) ? $this->xResponse->getContentType() : |
|
177 | - $this->xResponse->getContentType() . '; charset="' . $this->sCharacterEncoding . '"'; |
|
176 | + return empty($this->sCharacterEncoding) ? $this->xResponse->getContentType() : $this->xResponse->getContentType() . '; charset="' . $this->sCharacterEncoding . '"'; |
|
178 | 177 | } |
179 | 178 | |
180 | 179 | /** |
@@ -173,7 +173,8 @@ |
||
173 | 173 | * The constructor |
174 | 174 | */ |
175 | 175 | private function __construct() |
176 | - {} |
|
176 | + { |
|
177 | +} |
|
177 | 178 | |
178 | 179 | /** |
179 | 180 | * The current Jaxon version |
@@ -80,8 +80,7 @@ |
||
80 | 80 | public function getOutput(): string |
81 | 81 | { |
82 | 82 | $sResult = json_encode(($this->sUploadedFile) ? |
83 | - ['code' => 'success', 'upl' => $this->sUploadedFile] : |
|
84 | - ['code' => 'error', 'msg' => $this->sErrorMessage]) . ';'; |
|
83 | + ['code' => 'success', 'upl' => $this->sUploadedFile] : ['code' => 'error', 'msg' => $this->sErrorMessage]) . ';'; |
|
85 | 84 | $sConsoleLog = array_reduce($this->aDebugMessages, function($sJsLog, $sMessage) { |
86 | 85 | return "$sJsLog\n\t" . 'console.log("' . addslashes($sMessage) . '");'; |
87 | 86 | }, ''); |
@@ -38,7 +38,9 @@ |
||
38 | 38 | }); |
39 | 39 | // Code Generation |
40 | 40 | $this->set(MinifierInterface::class, function() { |
41 | - return new class extends FileMinifier implements MinifierInterface {}; |
|
41 | + return new class extends FileMinifier implements MinifierInterface |
|
42 | + { |
|
43 | +}; |
|
42 | 44 | }); |
43 | 45 | $this->set(AssetManager::class, function($c) { |
44 | 46 | return new AssetManager($c->g(ConfigManager::class), $c->g(ParameterReader::class), |
@@ -349,8 +349,7 @@ |
||
349 | 349 | } |
350 | 350 | elseif($this->sCondition !== null) |
351 | 351 | { |
352 | - $sScript = empty($sMessageScript) ? 'if(' . $this->sCondition . '){' . $sScript . ';}' : |
|
353 | - 'if(' . $this->sCondition . '){' . $sScript . ';}else{' . $sMessageScript . ';}'; |
|
352 | + $sScript = empty($sMessageScript) ? 'if(' . $this->sCondition . '){' . $sScript . ';}' : 'if(' . $this->sCondition . '){' . $sScript . ';}else{' . $sMessageScript . ';}'; |
|
354 | 353 | } |
355 | 354 | return $this->sVars . $sScript; |
356 | 355 | } |
@@ -30,8 +30,7 @@ |
||
30 | 30 | $aBody = $xRequest->getParsedBody(); |
31 | 31 | $aParams = $xRequest->getQueryParams(); |
32 | 32 | $aData = is_array($aBody) ? |
33 | - $this->readData($aBody['jxnbags'] ?? []) : |
|
34 | - $this->readData($aParams['jxnbags'] ?? []); |
|
33 | + $this->readData($aBody['jxnbags'] ?? []) : $this->readData($aParams['jxnbags'] ?? []); |
|
35 | 34 | $this->xDataBag = new DataBag($aData); |
36 | 35 | } |
37 | 36 |