Skip to content

Commit b2a6771

Browse files
imajinyunStyleCIBot
authored andcommitted
Apply fixes from StyleCI
1 parent b44378d commit b2a6771

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

β€Žsrc/leetcode/GenerateParentheses.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ private static function addParenthesis(array &$ans, int $left, int $right, strin
2323
}
2424

2525
if ($left > 0) {
26-
self::addParenthesis($ans, $left - 1, $right, $s.'(');
26+
self::addParenthesis($ans, $left - 1, $right, $s . '(');
2727
}
2828
if ($right > $left) {
29-
self::addParenthesis($ans, $left, $right - 1, $s.')');
29+
self::addParenthesis($ans, $left, $right - 1, $s . ')');
3030
}
3131
}
3232
}

β€Žsrc/leetcode/MissingRanges.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ public static function findMissingRanges(array &$nums, int $lower, int $upper):
1414
}
1515
foreach ($nums as $num) {
1616
if ($num > $lower) {
17-
$ans[] = $lower.($num - 1 > $lower ? ('->'.($num - 1)) : '');
17+
$ans[] = $lower . ($num - 1 > $lower ? ('->' . ($num - 1)) : '');
1818
}
1919
if ($num === $upper) {
2020
return $ans;
2121
}
2222
$lower = $num + 1;
2323
}
2424
if ($lower <= $upper) {
25-
$ans[] = $lower.($upper > $lower ? ('->'.$upper) : '');
25+
$ans[] = $lower . ($upper > $lower ? ('->' . $upper) : '');
2626
}
2727

2828
return $ans;

β€Žsrc/leetcode/SummaryRanges.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public static function summaryRanges(array $nums): array
2323
$i++;
2424
}
2525
if ($tmp !== $nums[$i]) {
26-
$ans[] = $tmp.'->'.$nums[$i];
26+
$ans[] = $tmp . '->' . $nums[$i];
2727
} else {
2828
$ans[] = (string) $tmp;
2929
}

β€Žtests/leetcode/DegreeOfAnArray.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use leetcode\DegreeOfAnArray;
88
use PHPUnit\Framework\TestCase;
99

10-
class DegreeOfAnArrayTest extends TestCase
10+
class DegreeOfAnArray extends TestCase
1111
{
1212
public function testFindShortestSubArray(): void
1313
{

β€Žtests/leetcode/LRUCacheTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function testLRUCacheRemove(): void
4545

4646
self::assertNull($cache->get(4));
4747

48-
self::assertSame('hello world!', $cache->get(5).' '.$cache->get(6).$cache->get(7));
48+
self::assertSame('hello world!', $cache->get(5) . ' ' . $cache->get(6) . $cache->get(7));
4949

5050
self::assertTrue($cache->remove(5));
5151
self::assertTrue($cache->remove(6));

β€Žtests/leetcode/RangeSumQueryImmutable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use leetcode\RangeSumQueryImmutable;
88
use PHPUnit\Framework\TestCase;
99

10-
class RangeSumQueryImmutableTest extends TestCase
10+
class RangeSumQueryImmutable extends TestCase
1111
{
1212
private array $num = [];
1313

0 commit comments

Comments
Β (0)