Skip to content

Commit e6c77d7

Browse files
committed
[CLEANUP] Autoformat the code
This is the v8.x backport of #748.
1 parent 1dd952b commit e6c77d7

File tree

4 files changed

+50
-15
lines changed

4 files changed

+50
-15
lines changed

src/Value/Size.php

+15-4
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,21 @@ class Size extends PrimitiveValue
2020
* @internal
2121
*/
2222
const ABSOLUTE_SIZE_UNITS = [
23-
'px', 'pt', 'pc',
24-
'cm', 'mm', 'mozmm', 'in',
25-
'vh', 'dvh', 'svh', 'lvh',
26-
'vw', 'vmin', 'vmax', 'rem',
23+
'px',
24+
'pt',
25+
'pc',
26+
'cm',
27+
'mm',
28+
'mozmm',
29+
'in',
30+
'vh',
31+
'dvh',
32+
'svh',
33+
'lvh',
34+
'vw',
35+
'vmin',
36+
'vmax',
37+
'rem',
2738
];
2839

2940
/**

tests/CSSList/AtRuleBlockListTest.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ public static function provideSyntacticlyCorrectAtRule()
3333
return [
3434
'media print' => ['@media print { html { background: white; color: black; } }'],
3535
'keyframes' => ['@keyframes mymove { from { top: 0px; } }'],
36-
'supports' => ['
36+
'supports' => [
37+
'
3738
@supports (display: flex) {
3839
.flex-container > * {
3940
text-shadow: 0 0 2px blue;
@@ -43,7 +44,8 @@ public static function provideSyntacticlyCorrectAtRule()
4344
display: flex;
4445
}
4546
}
46-
'],
47+
',
48+
],
4749
];
4850
}
4951

tests/Value/SizeTest.php

+28-6
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,34 @@ final class SizeTest extends TestCase
1818
public static function provideUnit()
1919
{
2020
$units = [
21-
'px', 'pt', 'pc',
22-
'cm', 'mm', 'mozmm', 'in',
23-
'vh', 'dvh', 'svh', 'lvh',
24-
'vw', 'vmin', 'vmax', 'rem',
25-
'%', 'em', 'ex', 'ch', 'fr',
26-
'deg', 'grad', 'rad', 's', 'ms', 'turn', 'Hz', 'kHz',
21+
'px',
22+
'pt',
23+
'pc',
24+
'cm',
25+
'mm',
26+
'mozmm',
27+
'in',
28+
'vh',
29+
'dvh',
30+
'svh',
31+
'lvh',
32+
'vw',
33+
'vmin',
34+
'vmax',
35+
'rem',
36+
'%',
37+
'em',
38+
'ex',
39+
'ch',
40+
'fr',
41+
'deg',
42+
'grad',
43+
'rad',
44+
's',
45+
'ms',
46+
'turn',
47+
'Hz',
48+
'kHz',
2749
];
2850

2951
return \array_combine(

tests/Value/ValueTest.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function parsesArithmeticInFunctions($operator)
3939
{
4040
$subject = Value::parseValue(new ParserState('max(300px, 50vh ' . $operator . ' 10px);', Settings::create()));
4141

42-
self::assertSame('max(300px,50vh ' . $operator . ' 10px)', (string) $subject);
42+
self::assertSame('max(300px,50vh ' . $operator . ' 10px)', (string)$subject);
4343
}
4444

4545
/**
@@ -74,7 +74,7 @@ public function parsesArithmeticWithMultipleOperatorsInFunctions(
7474

7575
$subject = Value::parseValue(new ParserState(\sprintf($parserTemplate, $expression), Settings::create()));
7676

77-
self::assertSame(\sprintf($expectedResultTemplate, $expression), (string) $subject);
77+
self::assertSame(\sprintf($expectedResultTemplate, $expression), (string)$subject);
7878
}
7979

8080
/**
@@ -102,6 +102,6 @@ public function parsesArithmeticWithMalformedOperandsInFunctions($leftOperand, $
102102
Settings::create()
103103
));
104104

105-
self::assertSame('max(300px,' . $leftOperand . ' + ' . $rightOperand . ')', (string) $subject);
105+
self::assertSame('max(300px,' . $leftOperand . ' + ' . $rightOperand . ')', (string)$subject);
106106
}
107107
}

0 commit comments

Comments
 (0)