Skip to content

Commit 7f6d782

Browse files
authored
Merge pull request MyIntervals#325 from oliverklee/task/types/url
Add type annotations for `URL`
2 parents 91d8da6 + ecaf690 commit 7f6d782

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

src/Value/URL.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,33 @@
44

55
use Sabberworm\CSS\OutputFormat;
66
use Sabberworm\CSS\Parsing\ParserState;
7+
use Sabberworm\CSS\Parsing\SourceException;
8+
use Sabberworm\CSS\Parsing\UnexpectedEOFException;
9+
use Sabberworm\CSS\Parsing\UnexpectedTokenException;
710

811
class URL extends PrimitiveValue
912
{
13+
/**
14+
* @var CSSString
15+
*/
1016
private $oURL;
1117

18+
/**
19+
* @param int $iLineNo
20+
*/
1221
public function __construct(CSSString $oURL, $iLineNo = 0)
1322
{
1423
parent::__construct($iLineNo);
1524
$this->oURL = $oURL;
1625
}
1726

27+
/**
28+
* @return URL
29+
*
30+
* @throws SourceException
31+
* @throws UnexpectedEOFException
32+
* @throws UnexpectedTokenException
33+
*/
1834
public static function parse(ParserState $oParserState)
1935
{
2036
$bUseUrl = $oParserState->comes('url', true);
@@ -32,11 +48,17 @@ public static function parse(ParserState $oParserState)
3248
return $oResult;
3349
}
3450

51+
/**
52+
* @return void
53+
*/
3554
public function setURL(CSSString $oURL)
3655
{
3756
$this->oURL = $oURL;
3857
}
3958

59+
/**
60+
* @return CSSString
61+
*/
4062
public function getURL()
4163
{
4264
return $this->oURL;

0 commit comments

Comments
 (0)