Skip to content

Commit c97b614

Browse files
committed
Fixes for CI
1 parent 765e712 commit c97b614

File tree

2 files changed

+16
-10
lines changed

2 files changed

+16
-10
lines changed

src/Value/Size.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,13 @@ public static function parse(ParserState $oParserState, $bIsColorComponent = fal
8080
while (is_numeric($oParserState->peek()) || $oParserState->comes('.') || $oParserState->comes('e', true)) {
8181
if ($oParserState->comes('.')) {
8282
$sSize .= $oParserState->consume('.');
83-
} elseif ($oParserState->comes('e', true)) {
84-
$sLookahead = $oParserState->peek(1, 1);
85-
if (is_numeric($sLookahead) || $sLookahead === '+' || $sLookahead === '-') {
86-
$sSize .= $oParserState->consume(2);
87-
} else {
88-
break; // Reached the unit part of the number like "em" or "ex"
89-
}
83+
} elseif ($oParserState->comes('e', true)) {
84+
$sLookahead = $oParserState->peek(1, 1);
85+
if (is_numeric($sLookahead) || $sLookahead === '+' || $sLookahead === '-') {
86+
$sSize .= $oParserState->consume(2);
87+
} else {
88+
break; // Reached the unit part of the number like "em" or "ex"
89+
}
9090
} else {
9191
$sSize .= $oParserState->consume(1);
9292
}

tests/ParserTest.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1174,9 +1174,15 @@ public function largeSizeValuesInFile()
11741174
/**
11751175
* @test
11761176
*/
1177-
public function scientificNotationSizeValuesInFile() {
1178-
$oDoc = $this->parsedStructureForFile('scientific-notation-numbers', Settings::create()->withMultibyteSupport(false));
1179-
$sExpected = 'body {background-color: rgba(62,174,151,3041820656523200167936);z-index: .030418206565232;font-size: 1em;top: 192.3478px;}';
1177+
public function scientificNotationSizeValuesInFile()
1178+
{
1179+
$oDoc = $this->parsedStructureForFile(
1180+
'scientific-notation-numbers',
1181+
Settings::create()->withMultibyteSupport(false)
1182+
);
1183+
$sExpected = ''
1184+
. 'body {background-color: rgba(62,174,151,3041820656523200167936);'
1185+
. 'z-index: .030418206565232;font-size: 1em;top: 192.3478px;}';
11801186
self::assertSame($sExpected, $oDoc->render());
11811187
}
11821188

0 commit comments

Comments
 (0)