@@ -323,7 +323,7 @@ discard block |
||
323 | 323 | $tmpfile = null; |
324 | 324 | $imagesize = getimagesize($this->_filename); |
325 | 325 | |
326 | - if ( $imagesize[2] == IMAGETYPE_JPEG |
|
326 | + if ($imagesize[2] == IMAGETYPE_JPEG |
|
327 | 327 | && $this->_jpegtran_available()) { |
328 | 328 | /* jpegtran */ |
329 | 329 | $operations = [ |
@@ -390,7 +390,7 @@ discard block |
||
390 | 390 | $imagesize = getimagesize($this->_filename); |
391 | 391 | |
392 | 392 | // Try lossless jpegtran rotation if possible |
393 | - if ( $imagesize[2] == IMAGETYPE_JPEG |
|
393 | + if ($imagesize[2] == IMAGETYPE_JPEG |
|
394 | 394 | && ($rotate % 90 == 0) |
395 | 395 | && $this->_jpegtran_available()) { |
396 | 396 | $tmpfile = $this->_get_tempfile(); |
@@ -502,7 +502,7 @@ discard block |
||
502 | 502 | */ |
503 | 503 | public function fill(?int $x = null, ?int $y = null, ?string $color = null, string $gravity = 'center') |
504 | 504 | { |
505 | - if ( empty($x) |
|
505 | + if (empty($x) |
|
506 | 506 | || empty($y) |
507 | 507 | || empty($color)) { |
508 | 508 | //This is a bit silly, but here for backwards compatibility... |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | $this->language = $language; |
24 | 24 | } |
25 | 25 | |
26 | - public function number(int|float $value, int $precision = 2) |
|
26 | + public function number(int | float $value, int $precision = 2) |
|
27 | 27 | { |
28 | 28 | // The fallback implementation in Intl only supports DECIMAL, so we hardcode the style here.. |
29 | 29 | $formatter = new NumberFormatter($this->get_locale(), NumberFormatter::DECIMAL); |
@@ -31,24 +31,24 @@ discard block |
||
31 | 31 | return $formatter->format($value); |
32 | 32 | } |
33 | 33 | |
34 | - public function date(int|string|DateTimeInterface $value = null, int|string $dateformat = 'medium') |
|
34 | + public function date(int | string | DateTimeInterface $value = null, int | string $dateformat = 'medium') |
|
35 | 35 | { |
36 | 36 | return $this->datetime($value, $dateformat, IntlDateFormatter::NONE); |
37 | 37 | } |
38 | 38 | |
39 | - public function time(int|string|DateTimeInterface $value = null, int|string $timeformat = 'short') |
|
39 | + public function time(int | string | DateTimeInterface $value = null, int | string $timeformat = 'short') |
|
40 | 40 | { |
41 | 41 | return $this->datetime($value, IntlDateFormatter::NONE, $timeformat); |
42 | 42 | } |
43 | 43 | |
44 | - public function datetime(int|string|DateTimeInterface $value = null, int|string $dateformat = 'medium', int|string $timeformat = 'short') |
|
44 | + public function datetime(int | string | DateTimeInterface $value = null, int | string $dateformat = 'medium', int | string $timeformat = 'short') |
|
45 | 45 | { |
46 | 46 | $value ??= time(); |
47 | 47 | $formatter = new IntlDateFormatter($this->get_locale(), $this->constant($dateformat), $this->constant($timeformat)); |
48 | 48 | return $formatter->format($value); |
49 | 49 | } |
50 | 50 | |
51 | - public function customdate(int|string|DateTimeInterface $value, string $pattern) |
|
51 | + public function customdate(int | string | DateTimeInterface $value, string $pattern) |
|
52 | 52 | { |
53 | 53 | $formatter = new IntlDateFormatter($this->get_locale(), IntlDateFormatter::FULL, IntlDateFormatter::FULL); |
54 | 54 | $formatter->setPattern($pattern); |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | return $ranger->format($start, $end); |
71 | 71 | } |
72 | 72 | |
73 | - private function constant(int|string $input) : int |
|
73 | + private function constant(int | string $input) : int |
|
74 | 74 | { |
75 | 75 | if (is_int($input)) { |
76 | 76 | return $input; |