Test Failed
Push — master ( 3fe7f5...1452f2 )
by Jinyun
02:11
created
src/leetcode/HappyNumber.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
         if ($n <= 0) {
12 12
             return false;
13 13
         }
14
-        $helper = static function (int $num) {
14
+        $helper = static function(int $num) {
15 15
             [$sum, $tmp] = [0, null];
16 16
             while ($num) {
17 17
                 $tmp = $num % 10;
@@ -37,9 +37,9 @@  discard block
 block discarded – undo
37 37
             return false;
38 38
         }
39 39
         $visited = [];
40
-        while ($n !== 1 && ! in_array($n, $visited, true)) {
40
+        while ($n !== 1 && !in_array($n, $visited, true)) {
41 41
             array_push($visited, $n);
42
-            $n = array_sum(array_map(fn ($x) => $x ** 2, str_split((string) $n)));
42
+            $n = array_sum(array_map(fn($x) => $x ** 2, str_split((string) $n)));
43 43
         }
44 44
 
45 45
         return !in_array($n, $visited, true);
Please login to merge, or discard this patch.