@@ -176,7 +176,7 @@ |
||
| 176 | 176 | $writer->addAttribute('value', $text); |
| 177 | 177 | } |
| 178 | 178 | |
| 179 | - switch($this->getAutoCompleteType()) { |
|
| 179 | + switch ($this->getAutoCompleteType()) { |
|
| 180 | 180 | case TTextBoxAutoCompleteType::Enabled: |
| 181 | 181 | $writer->addAttribute('autocomplete', 'on'); |
| 182 | 182 | break; |
@@ -182,7 +182,7 @@ |
||
| 182 | 182 | $this->weakAdd($object); |
| 183 | 183 | } |
| 184 | 184 | if ($object === null) { |
| 185 | - $this->_c--; //on read only, parent::removeAt won't remove for scrub. |
|
| 185 | + $this->_c--; //on read only, parent::removeAt won't remove for scrub. |
|
| 186 | 186 | if ($i === $this->_c) { |
| 187 | 187 | array_pop($this->_d); |
| 188 | 188 | } else { |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | * @throws TInvalidDataValueException if the original value is not in the string array. |
| 156 | 156 | * @return string|\UnitEnum the valid enumeration value |
| 157 | 157 | */ |
| 158 | - public static function ensureEnum($value, $enums): string|\UnitEnum |
|
| 158 | + public static function ensureEnum($value, $enums): string | \UnitEnum |
|
| 159 | 159 | { |
| 160 | 160 | static $types = []; |
| 161 | 161 | if (func_num_args() === 2 && is_string($enums)) { |
@@ -163,13 +163,13 @@ discard block |
||
| 163 | 163 | $types[$enums] = new \ReflectionClass($enums); |
| 164 | 164 | } |
| 165 | 165 | |
| 166 | - if($types[$enums]->isEnum()) { |
|
| 166 | + if ($types[$enums]->isEnum()) { |
|
| 167 | 167 | // Php 8.1 native enum instances |
| 168 | - if($value instanceof $enums) { |
|
| 168 | + if ($value instanceof $enums) { |
|
| 169 | 169 | return $value; |
| 170 | 170 | } |
| 171 | 171 | $enumValue = $enums::tryFrom($value); |
| 172 | - if($enumValue !== null) { |
|
| 172 | + if ($enumValue !== null) { |
|
| 173 | 173 | return $enumValue; |
| 174 | 174 | } |
| 175 | 175 | |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | */ |
| 58 | 58 | protected function getTagName() |
| 59 | 59 | { |
| 60 | - switch($this->getButtonTag()) { |
|
| 60 | + switch ($this->getButtonTag()) { |
|
| 61 | 61 | case TButtonTag::Input: |
| 62 | 62 | return 'input'; |
| 63 | 63 | case TButtonTag::Button: |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | { |
| 108 | 108 | $page = $this->getPage(); |
| 109 | 109 | $page->ensureRenderInForm($this); |
| 110 | - switch($this->getButtonType()) { |
|
| 110 | + switch ($this->getButtonType()) { |
|
| 111 | 111 | case TButtonType::Submit: |
| 112 | 112 | $writer->addAttribute('type', 'submit'); |
| 113 | 113 | break; |
@@ -105,7 +105,7 @@ |
||
| 105 | 105 | $this->_p = TPropertyValue::ensureInteger($value); |
| 106 | 106 | $this->setDefaultPriority($this->_dp); |
| 107 | 107 | $_d = []; |
| 108 | - foreach(array_keys($this->_d) as $priority) { |
|
| 108 | + foreach (array_keys($this->_d) as $priority) { |
|
| 109 | 109 | $newPriority = $this->ensurePriority($priority); |
| 110 | 110 | if (array_key_exists($newPriority, $_d)) { |
| 111 | 111 | $_d[$newPriority] = array_merge($_d[$newPriority], $this->_d[$priority]); |
@@ -233,7 +233,7 @@ |
||
| 233 | 233 | if ($a && is_object($this->_d[$priority][$i][0]) || !$a && is_object($this->_d[$priority][$i])) { |
| 234 | 234 | $obj = $a ? $this->_d[$priority][$i][0] : $this->_d[$priority][$i]; |
| 235 | 235 | if ($obj instanceof WeakReference) { |
| 236 | - if($obj = $obj->get()) { |
|
| 236 | + if ($obj = $obj->get()) { |
|
| 237 | 237 | $this->weakAdd($obj); |
| 238 | 238 | } else { |
| 239 | 239 | parent::removeAtIndexInPriority($i, $priority); |
@@ -91,7 +91,7 @@ |
||
| 91 | 91 | */ |
| 92 | 92 | public static function parseEncodingLanguage(string &$encoding, &$lang) |
| 93 | 93 | { |
| 94 | - if(strpos($encoding, '.') !== false) { |
|
| 94 | + if (strpos($encoding, '.') !== false) { |
|
| 95 | 95 | $parts = explode($encoding, '.', 1); |
| 96 | 96 | $encoding = $parts[0]; |
| 97 | 97 | $lang = $parts[1]; |
@@ -32,47 +32,47 @@ |
||
| 32 | 32 | public const ESC_CHAR_ENCODINGS_MAP = [ |
| 33 | 33 | "\x1B\x25\x47" => 'UTF-8', // ESC-'%G' |
| 34 | 34 | |
| 35 | - "\x1B\x28\x40" => 'ASCII', "\x1B\x29\x40" => 'ASCII', "\x1B\x2A\x40" => 'ASCII', "\x1B\x2B\x40" => 'ASCII', |
|
| 35 | + "\x1B\x28\x40" => 'ASCII', "\x1B\x29\x40" => 'ASCII', "\x1B\x2A\x40" => 'ASCII', "\x1B\x2B\x40" => 'ASCII', |
|
| 36 | 36 | "\x1B\x28\x41" => 'ASCII.en_GB', "\x1B\x29\x41" => 'ASCII.en_GB', "\x1B\x2A\x41" => 'ASCII.en_GB', "\x1B\x2B\x41" => 'ASCII.en_GB', |
| 37 | 37 | "\x1B\x28\x42" => 'ASCII.en_US', "\x1B\x29\x42" => 'ASCII.en_US', "\x1B\x2A\x42" => 'ASCII.en_US', "\x1B\x2B\x42" => 'ASCII.en_US', |
| 38 | - "\x1B\x28\x43" => 'ASCII.fi', "\x1B\x29\x43" => 'ASCII.fi', "\x1B\x2A\x43" => 'ASCII.fi', "\x1B\x2B\x43" => 'ASCII.fi', |
|
| 39 | - "\x1B\x28\x44" => 'ASCII.sv', "\x1B\x29\x44" => 'ASCII.sv', "\x1B\x2A\x44" => 'ASCII.sv', "\x1B\x2B\x44" => 'ASCII.sv', |
|
| 40 | - "\x1B\x28\x45" => 'ASCII.no', "\x1B\x29\x45" => 'ASCII.no', "\x1B\x2A\x45" => 'ASCII.no', "\x1B\x2B\x45" => 'ASCII.no', |
|
| 41 | - "\x1B\x28\x46" => 'ASCII.no', "\x1B\x29\x46" => 'ASCII.no', "\x1B\x2A\x46" => 'ASCII.no', "\x1B\x2B\x46" => 'ASCII.no', |
|
| 42 | - "\x1B\x28\x47" => 'ASCII.se', "\x1B\x29\x47" => 'ASCII.se', "\x1B\x2A\x47" => 'ASCII.se', "\x1B\x2B\x47" => 'ASCII.se', |
|
| 43 | - "\x1B\x28\x49" => 'JIS_X0201', "\x1B\x29\x49" => 'JIS_X0201', "\x1B\x2A\x49" => 'JIS_X0201', "\x1B\x2B\x49" => 'JIS_X0201', |
|
| 44 | - "\x1B\x28\x4A" => 'JIS_X0201', "\x1B\x29\x4A" => 'JIS_X0201', "\x1B\x2A\x4A" => 'JIS_X0201', "\x1B\x2B\x4A" => 'JIS_X0201', |
|
| 45 | - "\x1B\x28\x4B" => 'ASCII.de', "\x1B\x29\x4B" => 'ASCII.de', "\x1B\x2A\x4B" => 'ASCII.de', "\x1B\x2B\x4B" => 'ASCII.de', |
|
| 46 | - "\x1B\x28\x4C" => 'ASCII.pt', "\x1B\x29\x4C" => 'ASCII.pt', "\x1B\x2A\x4C" => 'ASCII.pt', "\x1B\x2B\x4C" => 'ASCII.pt', |
|
| 47 | - "\x1B\x28\x4E" => 'ISO-5427', "\x1B\x29\x4E" => 'ISO-5427', "\x1B\x2A\x4E" => 'ISO-5427', "\x1B\x2B\x4E" => 'ISO-5427', |
|
| 48 | - "\x1B\x28\x54" => 'ISO646-CN', "\x1B\x29\x54" => 'ISO646-CN', "\x1B\x2A\x54" => 'ISO646-CN', "\x1B\x2B\x54" => 'ISO646-CN', |
|
| 49 | - "\x1B\x28\x59" => 'ASCII.it', "\x1B\x29\x59" => 'ASCII.it', "\x1B\x2A\x59" => 'ASCII.it', "\x1B\x2B\x59" => 'ASCII.it', |
|
| 50 | - "\x1B\x28\x5A" => 'ASCII.es', "\x1B\x29\x5A" => 'ASCII.es', "\x1B\x2A\x5A" => 'ASCII.es', "\x1B\x2B\x5A" => 'ASCII.es', |
|
| 51 | - "\x1B\x28\x5B" => 'ASCII.el', "\x1B\x29\x5B" => 'ASCII.el', "\x1B\x2A\x5B" => 'ASCII.el', "\x1B\x2B\x5B" => 'ASCII.el', |
|
| 52 | - "\x1B\x28\x60" => 'ASCII.no', "\x1B\x29\x60" => 'ASCII.no', "\x1B\x2A\x60" => 'ASCII.no', "\x1B\x2B\x60" => 'ASCII.no', |
|
| 53 | - "\x1B\x28\x66" => 'ASCII.fr', "\x1B\x29\x66" => 'ASCII.fr', "\x1B\x2A\x66" => 'ASCII.fr', "\x1B\x2B\x66" => 'ASCII.fr', |
|
| 54 | - "\x1B\x28\x67" => 'ASCII.pt', "\x1B\x29\x67" => 'ASCII.pt', "\x1B\x2A\x67" => 'ASCII.pt', "\x1B\x2B\x67" => 'ASCII.pt', |
|
| 55 | - "\x1B\x28\x68" => 'ASCII.es', "\x1B\x29\x68" => 'ASCII.es', "\x1B\x2A\x68" => 'ASCII.es', "\x1B\x2B\x68" => 'ASCII.es', |
|
| 56 | - "\x1B\x28\x69" => 'ASCII.hu', "\x1B\x29\x69" => 'ASCII.hu', "\x1B\x2A\x69" => 'ASCII.hu', "\x1B\x2B\x69" => 'ASCII.hu', |
|
| 38 | + "\x1B\x28\x43" => 'ASCII.fi', "\x1B\x29\x43" => 'ASCII.fi', "\x1B\x2A\x43" => 'ASCII.fi', "\x1B\x2B\x43" => 'ASCII.fi', |
|
| 39 | + "\x1B\x28\x44" => 'ASCII.sv', "\x1B\x29\x44" => 'ASCII.sv', "\x1B\x2A\x44" => 'ASCII.sv', "\x1B\x2B\x44" => 'ASCII.sv', |
|
| 40 | + "\x1B\x28\x45" => 'ASCII.no', "\x1B\x29\x45" => 'ASCII.no', "\x1B\x2A\x45" => 'ASCII.no', "\x1B\x2B\x45" => 'ASCII.no', |
|
| 41 | + "\x1B\x28\x46" => 'ASCII.no', "\x1B\x29\x46" => 'ASCII.no', "\x1B\x2A\x46" => 'ASCII.no', "\x1B\x2B\x46" => 'ASCII.no', |
|
| 42 | + "\x1B\x28\x47" => 'ASCII.se', "\x1B\x29\x47" => 'ASCII.se', "\x1B\x2A\x47" => 'ASCII.se', "\x1B\x2B\x47" => 'ASCII.se', |
|
| 43 | + "\x1B\x28\x49" => 'JIS_X0201', "\x1B\x29\x49" => 'JIS_X0201', "\x1B\x2A\x49" => 'JIS_X0201', "\x1B\x2B\x49" => 'JIS_X0201', |
|
| 44 | + "\x1B\x28\x4A" => 'JIS_X0201', "\x1B\x29\x4A" => 'JIS_X0201', "\x1B\x2A\x4A" => 'JIS_X0201', "\x1B\x2B\x4A" => 'JIS_X0201', |
|
| 45 | + "\x1B\x28\x4B" => 'ASCII.de', "\x1B\x29\x4B" => 'ASCII.de', "\x1B\x2A\x4B" => 'ASCII.de', "\x1B\x2B\x4B" => 'ASCII.de', |
|
| 46 | + "\x1B\x28\x4C" => 'ASCII.pt', "\x1B\x29\x4C" => 'ASCII.pt', "\x1B\x2A\x4C" => 'ASCII.pt', "\x1B\x2B\x4C" => 'ASCII.pt', |
|
| 47 | + "\x1B\x28\x4E" => 'ISO-5427', "\x1B\x29\x4E" => 'ISO-5427', "\x1B\x2A\x4E" => 'ISO-5427', "\x1B\x2B\x4E" => 'ISO-5427', |
|
| 48 | + "\x1B\x28\x54" => 'ISO646-CN', "\x1B\x29\x54" => 'ISO646-CN', "\x1B\x2A\x54" => 'ISO646-CN', "\x1B\x2B\x54" => 'ISO646-CN', |
|
| 49 | + "\x1B\x28\x59" => 'ASCII.it', "\x1B\x29\x59" => 'ASCII.it', "\x1B\x2A\x59" => 'ASCII.it', "\x1B\x2B\x59" => 'ASCII.it', |
|
| 50 | + "\x1B\x28\x5A" => 'ASCII.es', "\x1B\x29\x5A" => 'ASCII.es', "\x1B\x2A\x5A" => 'ASCII.es', "\x1B\x2B\x5A" => 'ASCII.es', |
|
| 51 | + "\x1B\x28\x5B" => 'ASCII.el', "\x1B\x29\x5B" => 'ASCII.el', "\x1B\x2A\x5B" => 'ASCII.el', "\x1B\x2B\x5B" => 'ASCII.el', |
|
| 52 | + "\x1B\x28\x60" => 'ASCII.no', "\x1B\x29\x60" => 'ASCII.no', "\x1B\x2A\x60" => 'ASCII.no', "\x1B\x2B\x60" => 'ASCII.no', |
|
| 53 | + "\x1B\x28\x66" => 'ASCII.fr', "\x1B\x29\x66" => 'ASCII.fr', "\x1B\x2A\x66" => 'ASCII.fr', "\x1B\x2B\x66" => 'ASCII.fr', |
|
| 54 | + "\x1B\x28\x67" => 'ASCII.pt', "\x1B\x29\x67" => 'ASCII.pt', "\x1B\x2A\x67" => 'ASCII.pt', "\x1B\x2B\x67" => 'ASCII.pt', |
|
| 55 | + "\x1B\x28\x68" => 'ASCII.es', "\x1B\x29\x68" => 'ASCII.es', "\x1B\x2A\x68" => 'ASCII.es', "\x1B\x2B\x68" => 'ASCII.es', |
|
| 56 | + "\x1B\x28\x69" => 'ASCII.hu', "\x1B\x29\x69" => 'ASCII.hu', "\x1B\x2A\x69" => 'ASCII.hu', "\x1B\x2B\x69" => 'ASCII.hu', |
|
| 57 | 57 | "\x1B\x28\x77" => 'ASCII.fr_CA', "\x1B\x29\x77" => 'ASCII.fr_CA', "\x1B\x2A\x77" => 'ASCII.fr_CA', "\x1B\x2B\x77" => 'ASCII.fr_CA', |
| 58 | 58 | "\x1B\x28\x78" => 'ASCII.fr_CA', "\x1B\x29\x78" => 'ASCII.fr_CA', "\x1B\x2A\x78" => 'ASCII.fr_CA', "\x1B\x2B\x78" => 'ASCII.fr_CA', |
| 59 | - "\x1B\x28\x7A" => 'ASCII.yu', "\x1B\x29\x7A" => 'ASCII.yu', "\x1B\x2A\x7A" => 'ASCII.yu', "\x1B\x2B\x7A" => 'ASCII.yu', |
|
| 59 | + "\x1B\x28\x7A" => 'ASCII.yu', "\x1B\x29\x7A" => 'ASCII.yu', "\x1B\x2A\x7A" => 'ASCII.yu', "\x1B\x2B\x7A" => 'ASCII.yu', |
|
| 60 | 60 | |
| 61 | - "\x1B\x2C\x41" => 'ISO-8859-1', "\x1B\x2D\x41" => 'ISO-8859-1', "\x1B\x2E\x41" => 'ISO-8859-1', "\x1B\x2F\x41" => 'ISO-8859-1', |
|
| 62 | - "\x1B\x2C\x42" => 'ISO-8859-2', "\x1B\x2D\x42" => 'ISO-8859-2', "\x1B\x2E\x42" => 'ISO-8859-2', "\x1B\x2F\x42" => 'ISO-8859-2', |
|
| 63 | - "\x1B\x2C\x43" => 'ISO-8859-3', "\x1B\x2D\x43" => 'ISO-8859-3', "\x1B\x2E\x43" => 'ISO-8859-3', "\x1B\x2F\x43" => 'ISO-8859-3', |
|
| 64 | - "\x1B\x2C\x44" => 'ISO-8859-4', "\x1B\x2D\x44" => 'ISO-8859-4', "\x1B\x2E\x44" => 'ISO-8859-4', "\x1B\x2F\x44" => 'ISO-8859-4', |
|
| 65 | - "\x1B\x2C\x45" => 'ISO-8859-5', "\x1B\x2D\x45" => 'ISO-8859-5', "\x1B\x2E\x45" => 'ISO-8859-5', "\x1B\x2F\x45" => 'ISO-8859-5', |
|
| 66 | - "\x1B\x2C\x46" => 'ISO-8859-7', "\x1B\x2D\x46" => 'ISO-8859-7', "\x1B\x2E\x46" => 'ISO-8859-7', "\x1B\x2F\x46" => 'ISO-8859-7', |
|
| 67 | - "\x1B\x2C\x47" => 'ISO-8859-6', "\x1B\x2D\x47" => 'ISO-8859-6', "\x1B\x2E\x47" => 'ISO-8859-6', "\x1B\x2F\x47" => 'ISO-8859-6', |
|
| 68 | - "\x1B\x2C\x48" => 'ISO-8859-8', "\x1B\x2D\x48" => 'ISO-8859-8', "\x1B\x2E\x48" => 'ISO-8859-8', "\x1B\x2F\x48" => 'ISO-8859-8', |
|
| 69 | - "\x1B\x2C\x49" => 'CSN 369103', "\x1B\x2D\x49" => 'CSN 369103', "\x1B\x2E\x49" => 'CSN 369103', "\x1B\x2F\x49" => 'CSN 369103', |
|
| 61 | + "\x1B\x2C\x41" => 'ISO-8859-1', "\x1B\x2D\x41" => 'ISO-8859-1', "\x1B\x2E\x41" => 'ISO-8859-1', "\x1B\x2F\x41" => 'ISO-8859-1', |
|
| 62 | + "\x1B\x2C\x42" => 'ISO-8859-2', "\x1B\x2D\x42" => 'ISO-8859-2', "\x1B\x2E\x42" => 'ISO-8859-2', "\x1B\x2F\x42" => 'ISO-8859-2', |
|
| 63 | + "\x1B\x2C\x43" => 'ISO-8859-3', "\x1B\x2D\x43" => 'ISO-8859-3', "\x1B\x2E\x43" => 'ISO-8859-3', "\x1B\x2F\x43" => 'ISO-8859-3', |
|
| 64 | + "\x1B\x2C\x44" => 'ISO-8859-4', "\x1B\x2D\x44" => 'ISO-8859-4', "\x1B\x2E\x44" => 'ISO-8859-4', "\x1B\x2F\x44" => 'ISO-8859-4', |
|
| 65 | + "\x1B\x2C\x45" => 'ISO-8859-5', "\x1B\x2D\x45" => 'ISO-8859-5', "\x1B\x2E\x45" => 'ISO-8859-5', "\x1B\x2F\x45" => 'ISO-8859-5', |
|
| 66 | + "\x1B\x2C\x46" => 'ISO-8859-7', "\x1B\x2D\x46" => 'ISO-8859-7', "\x1B\x2E\x46" => 'ISO-8859-7', "\x1B\x2F\x46" => 'ISO-8859-7', |
|
| 67 | + "\x1B\x2C\x47" => 'ISO-8859-6', "\x1B\x2D\x47" => 'ISO-8859-6', "\x1B\x2E\x47" => 'ISO-8859-6', "\x1B\x2F\x47" => 'ISO-8859-6', |
|
| 68 | + "\x1B\x2C\x48" => 'ISO-8859-8', "\x1B\x2D\x48" => 'ISO-8859-8', "\x1B\x2E\x48" => 'ISO-8859-8', "\x1B\x2F\x48" => 'ISO-8859-8', |
|
| 69 | + "\x1B\x2C\x49" => 'CSN 369103', "\x1B\x2D\x49" => 'CSN 369103', "\x1B\x2E\x49" => 'CSN 369103', "\x1B\x2F\x49" => 'CSN 369103', |
|
| 70 | 70 | |
| 71 | - "\x1B\x24\x28\x40" => 'JIS0208', "\x1B\x24\x29\x40" => 'JIS0208', "\x1B\x24\x2A\x40" => 'JIS0208', "\x1B\x24\x2B\x40" => 'JIS0208', |
|
| 72 | - "\x1B\x24\x28\x42" => 'JIS0208', "\x1B\x24\x29\x42" => 'JIS0208', "\x1B\x24\x2A\x42" => 'JIS0208', "\x1B\x24\x2B\x42" => 'JIS0208', |
|
| 73 | - "\x1B\x24\x28\x44" => 'JIS_X0212', "\x1B\x24\x29\x44" => 'JIS_X0212', "\x1B\x24\x2A\x44" => 'JIS_X0212', "\x1B\x24\x2B\x44" => 'JIS_X0212', |
|
| 74 | - "\x1B\x24\x28\x4F" => 'ISO-2022-JP-3', "\x1B\x24\x29\x4F" => 'ISO-2022-JP-3', "\x1B\x24\x2A\x4F" => 'ISO-2022-JP-3', "\x1B\x24\x2B\x4F" => 'ISO-2022-JP-3', |
|
| 75 | - "\x1B\x24\x28\x50" => 'ISO-2022-JP-3', "\x1B\x24\x29\x50" => 'ISO-2022-JP-3', "\x1B\x24\x2A\x50" => 'ISO-2022-JP-3', "\x1B\x24\x2B\x50" => 'ISO-2022-JP-3', |
|
| 71 | + "\x1B\x24\x28\x40" => 'JIS0208', "\x1B\x24\x29\x40" => 'JIS0208', "\x1B\x24\x2A\x40" => 'JIS0208', "\x1B\x24\x2B\x40" => 'JIS0208', |
|
| 72 | + "\x1B\x24\x28\x42" => 'JIS0208', "\x1B\x24\x29\x42" => 'JIS0208', "\x1B\x24\x2A\x42" => 'JIS0208', "\x1B\x24\x2B\x42" => 'JIS0208', |
|
| 73 | + "\x1B\x24\x28\x44" => 'JIS_X0212', "\x1B\x24\x29\x44" => 'JIS_X0212', "\x1B\x24\x2A\x44" => 'JIS_X0212', "\x1B\x24\x2B\x44" => 'JIS_X0212', |
|
| 74 | + "\x1B\x24\x28\x4F" => 'ISO-2022-JP-3', "\x1B\x24\x29\x4F" => 'ISO-2022-JP-3', "\x1B\x24\x2A\x4F" => 'ISO-2022-JP-3', "\x1B\x24\x2B\x4F" => 'ISO-2022-JP-3', |
|
| 75 | + "\x1B\x24\x28\x50" => 'ISO-2022-JP-3', "\x1B\x24\x29\x50" => 'ISO-2022-JP-3', "\x1B\x24\x2A\x50" => 'ISO-2022-JP-3', "\x1B\x24\x2B\x50" => 'ISO-2022-JP-3', |
|
| 76 | 76 | ]; |
| 77 | 77 | |
| 78 | 78 | /** |