Skip to content

Commit c3c707c

Browse files
committed
Fix indents
1 parent 221974b commit c3c707c

File tree

2 files changed

+31
-27
lines changed

2 files changed

+31
-27
lines changed

src/Parsing/ParserState.php

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,11 @@ class ParserState
4848
* @var int
4949
*/
5050
private $iLineNo;
51-
private $iAnchor;
51+
52+
/**
53+
* @var int
54+
*/
55+
private $iAnchor;
5256

5357
/**
5458
* @param string $sText the complete CSS as text (i.e., usually the contents of a CSS file)
@@ -60,7 +64,7 @@ public function __construct($sText, Settings $oParserSettings, $iLineNo = 1)
6064
$this->sText = $sText;
6165
$this->iCurrentPosition = 0;
6266
$this->iLineNo = $iLineNo;
63-
$this->iAnchor = null;
67+
$this->iAnchor = null;
6468
$this->setCharset($this->oParserSettings->sDefaultCharset);
6569
}
6670

@@ -135,9 +139,9 @@ public function backtrackToAnchor()
135139
*/
136140
public function parseIdentifier($bIgnoreCase = true)
137141
{
138-
if ($this->isEnd()) {
139-
throw new UnexpectedEOFException('', '', 'identifier', $this->iLineNo);
140-
}
142+
if ($this->isEnd()) {
143+
throw new UnexpectedEOFException('', '', 'identifier', $this->iLineNo);
144+
}
141145
$sResult = $this->parseCharacter(true);
142146
if ($sResult === null) {
143147
throw new UnexpectedTokenException($sResult, $this->peek(5), 'identifier', $this->iLineNo);

src/Value/URL.php

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -37,28 +37,28 @@ public function __construct(CSSString $oURL, $iLineNo = 0)
3737
public static function parse(ParserState $oParserState)
3838
{
3939
$oParserState->setAnchor();
40-
$sIdentifier = '';
41-
for ($i = 0; $i < 3; $i++) {
42-
$sChar = $oParserState->parseCharacter(true);
43-
if ($sChar === null) {
44-
break;
45-
}
46-
$sIdentifier .= $sChar;
47-
}
48-
$bUseUrl = $oParserState->streql($sIdentifier, 'url');
49-
if ($bUseUrl) {
50-
$oParserState->consumeWhiteSpace();
51-
$oParserState->consume('(');
52-
} else {
53-
$oParserState->backtrackToAnchor();
54-
}
55-
$oParserState->consumeWhiteSpace();
56-
$oResult = new URL(CSSString::parse($oParserState), $oParserState->currentLine());
57-
if ($bUseUrl) {
58-
$oParserState->consumeWhiteSpace();
59-
$oParserState->consume(')');
60-
}
61-
return $oResult;
40+
$sIdentifier = '';
41+
for ($i = 0; $i < 3; $i++) {
42+
$sChar = $oParserState->parseCharacter(true);
43+
if ($sChar === null) {
44+
break;
45+
}
46+
$sIdentifier .= $sChar;
47+
}
48+
$bUseUrl = $oParserState->streql($sIdentifier, 'url');
49+
if ($bUseUrl) {
50+
$oParserState->consumeWhiteSpace();
51+
$oParserState->consume('(');
52+
} else {
53+
$oParserState->backtrackToAnchor();
54+
}
55+
$oParserState->consumeWhiteSpace();
56+
$oResult = new URL(CSSString::parse($oParserState), $oParserState->currentLine());
57+
if ($bUseUrl) {
58+
$oParserState->consumeWhiteSpace();
59+
$oParserState->consume(')');
60+
}
61+
return $oResult;
6262
}
6363

6464
/**

0 commit comments

Comments
 (0)