Test Failed
Push — master ( 5cce80...9c1f9d )
by Jinyun
02:11
created
src/leetcode/RangeSumQueryImmutable.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
             return 0;
28 28
         }
29 29
 
30
-        $helper = static function (array $map) use ($n) {
30
+        $helper = static function(array $map) use ($n) {
31 31
             for ($i = 1; $i < $n; $i++) {
32 32
                 $map[$i] += $map[$i - 1];
33 33
             }
Please login to merge, or discard this patch.
src/leetcode/DecodeWays.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
         if ($n <= 0 || (isset($s[0]) && $s[0] === '0')) {
33 33
             return 0;
34 34
         }
35
-        $helper = static function ($s, $start, $length) {
35
+        $helper = static function($s, $start, $length) {
36 36
             $len = $start > $length ? $start : $length;
37 37
             $pos = $start > $length ? 1 : $start;
38 38
             $tmp = substr($s, 0, $len);
Please login to merge, or discard this patch.
src/leetcode/BestTimeToBuyAndSellStockIV.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
         if ($n <= 0) {
13 13
             return 0;
14 14
         }
15
-        $helper = static function () use ($prices) {
15
+        $helper = static function() use ($prices) {
16 16
             [$buy, $sell] = [0, -$prices[0]];
17 17
             foreach ($prices as $i => $price) {
18 18
                 $tmp = $buy - $price;
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
         if ($n <= 0) {
49 49
             return 0;
50 50
         }
51
-        $helper = static function () use ($prices) {
51
+        $helper = static function() use ($prices) {
52 52
             [$n, $maxProfit] = [count($prices), 0];
53 53
             for ($i = 1; $i < $n; $i++) {
54 54
                 if ($prices[$i] > $prices[$i - 1]) {
Please login to merge, or discard this patch.
src/leetcode/ThreeSum.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
             return $ans;
14 14
         }
15 15
 
16
-        $isSameArray = static function (array $needle, array $haystack = []) {
16
+        $isSameArray = static function(array $needle, array $haystack = []) {
17 17
             sort($needle);
18 18
             foreach ($haystack as $value) {
19 19
                 sort($value);
Please login to merge, or discard this patch.
src/leetcode/MaximalSquare.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
         if ($m <= 0 || $n <= 0) {
13 13
             return $ans;
14 14
         }
15
-        $helper = static function (array $array, int $k) {
15
+        $helper = static function(array $array, int $k) {
16 16
             $n = count($array);
17 17
             if ($n < $k) {
18 18
                 return 0;
Please login to merge, or discard this patch.
src/leetcode/ValidSudoku.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
         if ($m === 0 || $n === 0) {
13 13
             return false;
14 14
         }
15
-        $helper = static function (array &$array, int $k, int $v) {
15
+        $helper = static function(array &$array, int $k, int $v) {
16 16
             $array[$k][$v] = isset($array[$k][$v]) ? $array[$k][$v] + 1 : 1;
17 17
         };
18 18
         $row = $col = $box = array_fill(0, $m, array_fill(0, $n, 0));
Please login to merge, or discard this patch.
src/leetcode/SumOfEvenNumbersAfterQueries.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
         if (empty($arr) || empty($queries)) {
12 12
             return [];
13 13
         }
14
-        $sum = array_sum(array_filter($arr, function ($val) {
14
+        $sum = array_sum(array_filter($arr, function($val) {
15 15
             return $val % 2 === 0;
16 16
         }));
17 17
         $ans = [];
Please login to merge, or discard this patch.
src/leetcode/DuplicateZeros.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
                 }
26 26
             } else {
27 27
                 if ($j < $m) {
28
-                    $arr[$j]= $arr[$i];
28
+                    $arr[$j] = $arr[$i];
29 29
                 }
30 30
                 $j--;
31 31
                 if ($j < $m) {
Please login to merge, or discard this patch.
src/leetcode/DayOfTheWeek.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
             return '';
13 13
         }
14 14
 
15
-        $isLeapYear = static function (int $x): bool {
15
+        $isLeapYear = static function(int $x): bool {
16 16
             return ($x % 400 === 0) || ($x % 4 === 0 && $x % 100 !== 0);
17 17
         };
18 18
         $days = -1; // Start from 1971-01-01, remove that day.
Please login to merge, or discard this patch.