@@ -36,12 +36,12 @@ |
||
| 36 | 36 | return array( |
| 37 | 37 | self::GROUP => self::ARAB_GROUP, |
| 38 | 38 | self::DECIMAL => self::ARAB_DECIMAL, |
| 39 | - self::NEGATIVE => self::LTR_MARK . self::MINUS_SIGN, |
|
| 39 | + self::NEGATIVE => self::LTR_MARK.self::MINUS_SIGN, |
|
| 40 | 40 | ); |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | protected function percentFormat() |
| 44 | 44 | { |
| 45 | - return '%s' . self::ARAB_PERCENT; |
|
| 45 | + return '%s'.self::ARAB_PERCENT; |
|
| 46 | 46 | } |
| 47 | 47 | } |
@@ -47,17 +47,17 @@ discard block |
||
| 47 | 47 | */ |
| 48 | 48 | public function code() |
| 49 | 49 | { |
| 50 | - $code = $this->language()->code() . '_' . $this->territory()->code(); |
|
| 50 | + $code = $this->language()->code().'_'.$this->territory()->code(); |
|
| 51 | 51 | |
| 52 | 52 | if ($this->script() != $this->language()->defaultScript()) { |
| 53 | - $code .= '@' . strtolower($this->script()->unicodeName()); |
|
| 53 | + $code .= '@'.strtolower($this->script()->unicodeName()); |
|
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | if ($this->variant()) { |
| 57 | 57 | if ($this->variant()->code() === 'posix') { |
| 58 | 58 | $code = 'POSIX'; |
| 59 | 59 | } else { |
| 60 | - $code .= '@' . $this->variant()->code(); |
|
| 60 | + $code .= '@'.$this->variant()->code(); |
|
| 61 | 61 | } |
| 62 | 62 | } |
| 63 | 63 | |
@@ -147,9 +147,9 @@ discard block |
||
| 147 | 147 | public function htmlAttributes() |
| 148 | 148 | { |
| 149 | 149 | if ($this->direction() === 'rtl' || $this->direction() !== $this->script()->direction()) { |
| 150 | - return 'lang="' . $this->languageTag() . '" dir="' . $this->direction() . '"'; |
|
| 150 | + return 'lang="'.$this->languageTag().'" dir="'.$this->direction().'"'; |
|
| 151 | 151 | } else { |
| 152 | - return 'lang="' . $this->languageTag() . '"'; |
|
| 152 | + return 'lang="'.$this->languageTag().'"'; |
|
| 153 | 153 | } |
| 154 | 154 | } |
| 155 | 155 | |
@@ -170,13 +170,13 @@ discard block |
||
| 170 | 170 | { |
| 171 | 171 | $language_tag = $this->language()->code(); |
| 172 | 172 | if ($this->script() != $this->language()->defaultScript()) { |
| 173 | - $language_tag .= '-' . $this->script()->code(); |
|
| 173 | + $language_tag .= '-'.$this->script()->code(); |
|
| 174 | 174 | } |
| 175 | 175 | if ($this->territory() != $this->language()->defaultTerritory()) { |
| 176 | - $language_tag .= '-' . $this->territory()->code(); |
|
| 176 | + $language_tag .= '-'.$this->territory()->code(); |
|
| 177 | 177 | } |
| 178 | 178 | if ($this->variant()) { |
| 179 | - $language_tag .= '-' . $this->variant()->code(); |
|
| 179 | + $language_tag .= '-'.$this->variant()->code(); |
|
| 180 | 180 | } |
| 181 | 181 | |
| 182 | 182 | return $language_tag; |
@@ -211,20 +211,20 @@ discard block |
||
| 211 | 211 | $integers = $parts[0]; |
| 212 | 212 | if (strlen($integers) >= $this->digitsFirstGroup() + $this->minimumGroupingDigits()) { |
| 213 | 213 | $todo = substr($integers, 0, -$this->digitsFirstGroup()); |
| 214 | - $integers = self::GROUP . substr($integers, -$this->digitsFirstGroup()); |
|
| 214 | + $integers = self::GROUP.substr($integers, -$this->digitsFirstGroup()); |
|
| 215 | 215 | while (strlen($todo) >= $this->digitsGroup() + $this->minimumGroupingDigits()) { |
| 216 | - $integers = self::GROUP . substr($todo, -$this->digitsGroup()) . $integers; |
|
| 216 | + $integers = self::GROUP.substr($todo, -$this->digitsGroup()).$integers; |
|
| 217 | 217 | $todo = substr($todo, 0, -$this->digitsGroup()); |
| 218 | 218 | } |
| 219 | - $integers = $todo . $integers; |
|
| 219 | + $integers = $todo.$integers; |
|
| 220 | 220 | } |
| 221 | 221 | if (count($parts) > 1) { |
| 222 | - $decimals = self::DECIMAL . $parts[1]; |
|
| 222 | + $decimals = self::DECIMAL.$parts[1]; |
|
| 223 | 223 | } else { |
| 224 | 224 | $decimals = ''; |
| 225 | 225 | } |
| 226 | 226 | |
| 227 | - return $this->digits($negative . $integers . $decimals); |
|
| 227 | + return $this->digits($negative.$integers.$decimals); |
|
| 228 | 228 | } |
| 229 | 229 | |
| 230 | 230 | /** |
@@ -266,7 +266,7 @@ discard block |
||
| 266 | 266 | */ |
| 267 | 267 | protected function percentFormat() |
| 268 | 268 | { |
| 269 | - return '%s' . self::PERCENT; |
|
| 269 | + return '%s'.self::PERCENT; |
|
| 270 | 270 | } |
| 271 | 271 | |
| 272 | 272 | /** |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | */ |
| 58 | 58 | public function translateContext($context, $message) |
| 59 | 59 | { |
| 60 | - $key = $context . chr(4) . $message; |
|
| 60 | + $key = $context.chr(4).$message; |
|
| 61 | 61 | if (isset($this->translations[$key])) { |
| 62 | 62 | return $this->translations[$key]; |
| 63 | 63 | } else { |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | */ |
| 78 | 78 | public function translatePlural($message1, $message2, $number) |
| 79 | 79 | { |
| 80 | - $key = $message1 . chr(0) . $message2; |
|
| 80 | + $key = $message1.chr(0).$message2; |
|
| 81 | 81 | if (isset($this->translations[$key])) { |
| 82 | 82 | $plurals = explode(chr(0), $this->translations[$key]); |
| 83 | 83 | if (count($plurals) === $this->plural_rule->plurals()) { |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | */ |
| 36 | 36 | public static function create($code) |
| 37 | 37 | { |
| 38 | - $class = __NAMESPACE__ . '\Locale\Locale' . implode(array_map(function ($x) { |
|
| 38 | + $class = __NAMESPACE__.'\Locale\Locale'.implode(array_map(function($x) { |
|
| 39 | 39 | return ucfirst(strtolower($x)); |
| 40 | 40 | }, preg_split('/[^a-zA-Z0-9]+/', $code))); |
| 41 | 41 | |
@@ -60,18 +60,18 @@ discard block |
||
| 60 | 60 | if (!empty($server['HTTP_ACCEPT_LANGUAGE'])) { |
| 61 | 61 | $http_accept_language = strtolower(str_replace(' ', '', $server['HTTP_ACCEPT_LANGUAGE'])); |
| 62 | 62 | preg_match_all('/(?:([a-z][a-z0-9_-]+)(?:;q=([0-9.]+))?)/', $http_accept_language, $match); |
| 63 | - $preferences = array_map(function ($x) { |
|
| 63 | + $preferences = array_map(function($x) { |
|
| 64 | 64 | return $x === '' ? 1.0 : (float) $x; |
| 65 | 65 | }, array_combine($match[1], $match[2])); |
| 66 | 66 | |
| 67 | 67 | // Need a stable sort, as the original order is significant |
| 68 | - $preferences = array_map(function ($x) { |
|
| 68 | + $preferences = array_map(function($x) { |
|
| 69 | 69 | static $n = 0; |
| 70 | 70 | |
| 71 | 71 | return array($x, --$n); |
| 72 | 72 | }, $preferences); |
| 73 | 73 | arsort($preferences); |
| 74 | - $preferences = array_map(function ($x) { |
|
| 74 | + $preferences = array_map(function($x) { |
|
| 75 | 75 | return $x[0]; |
| 76 | 76 | }, $preferences); |
| 77 | 77 | |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | |
| 21 | 21 | protected function percentFormat() |
| 22 | 22 | { |
| 23 | - return '%s' . self::NBSP . self::PERCENT; |
|
| 23 | + return '%s'.self::NBSP.self::PERCENT; |
|
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | public function territory() |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | |
| 24 | 24 | protected function percentFormat() |
| 25 | 25 | { |
| 26 | - return '%s' . self::PERCENT; |
|
| 26 | + return '%s'.self::PERCENT; |
|
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | public function territory() |
@@ -28,6 +28,6 @@ |
||
| 28 | 28 | |
| 29 | 29 | protected function percentFormat() |
| 30 | 30 | { |
| 31 | - return '%s' . self::NBSP . self::PERCENT; |
|
| 31 | + return '%s'.self::NBSP.self::PERCENT; |
|
| 32 | 32 | } |
| 33 | 33 | } |
@@ -28,6 +28,6 @@ |
||
| 28 | 28 | |
| 29 | 29 | protected function percentFormat() |
| 30 | 30 | { |
| 31 | - return '%s' . self::NBSP . self::PERCENT; |
|
| 31 | + return '%s'.self::NBSP.self::PERCENT; |
|
| 32 | 32 | } |
| 33 | 33 | } |
@@ -28,6 +28,6 @@ |
||
| 28 | 28 | |
| 29 | 29 | protected function percentFormat() |
| 30 | 30 | { |
| 31 | - return '%s' . self::NBSP . self::PERCENT; |
|
| 31 | + return '%s'.self::NBSP.self::PERCENT; |
|
| 32 | 32 | } |
| 33 | 33 | } |