@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | if ($n < 2) { |
13 | 13 | return $s; |
14 | 14 | } |
15 | - $helper = static function (string $s) { |
|
15 | + $helper = static function(string $s) { |
|
16 | 16 | $n = strlen($s); |
17 | 17 | for ($i = 0; $i < $n / 2; $i++) { |
18 | 18 | if ($s[$i] !== $s[$n - $i - 1]) { |
@@ -44,8 +44,8 @@ discard block |
||
44 | 44 | } |
45 | 45 | |
46 | 46 | $start = $length = 0; |
47 | - $helper = static function (string $s, int $l, int $r, int &$start, int &$length) { |
|
48 | - while ($l >= 0 && $r < strlen($s) && $s[$l ] === $s[$r]) { |
|
47 | + $helper = static function(string $s, int $l, int $r, int &$start, int &$length) { |
|
48 | + while ($l >= 0 && $r < strlen($s) && $s[$l] === $s[$r]) { |
|
49 | 49 | $l--; |
50 | 50 | $r++; |
51 | 51 | } |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | $prev = $n - 1 - $j; |
86 | 86 | if ($prev + $dp[$i][$j] - 1 === $i) { |
87 | 87 | $max = $dp[$i][$j]; |
88 | - $len= $i; |
|
88 | + $len = $i; |
|
89 | 89 | } |
90 | 90 | } |
91 | 91 | } |
@@ -50,7 +50,7 @@ |
||
50 | 50 | if ($n < 0) { |
51 | 51 | return 1 / self::myPow3($x, -$n); |
52 | 52 | } |
53 | - $y = self::myPow3($x, (int)($n / 2)); |
|
53 | + $y = self::myPow3($x, (int) ($n / 2)); |
|
54 | 54 | |
55 | 55 | return $n % 2 === 0 ? $y * $y : $y * $y * $x; |
56 | 56 | } |