Skip to content

Commit 5a4245f

Browse files
authored
[CLEANUP] Add native return types to parse() (#608)
1 parent 93835bc commit 5a4245f

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

src/Value/CSSFunction.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,11 @@ public function __construct($sName, $aArguments, $sSeparator = ',', $iLineNo = 0
3737
* @param ParserState $oParserState
3838
* @param bool $bIgnoreCase
3939
*
40-
* @return CSSFunction
41-
*
4240
* @throws SourceException
4341
* @throws UnexpectedEOFException
4442
* @throws UnexpectedTokenException
4543
*/
46-
public static function parse(ParserState $oParserState, $bIgnoreCase = false)
44+
public static function parse(ParserState $oParserState, $bIgnoreCase = false): CSSFunction
4745
{
4846
$mResult = $oParserState->parseIdentifier($bIgnoreCase);
4947
$oParserState->consume('(');

src/Value/CalcFunction.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class CalcFunction extends CSSFunction
2525
* @throws UnexpectedTokenException
2626
* @throws UnexpectedEOFException
2727
*/
28-
public static function parse(ParserState $oParserState, $bIgnoreCase = false): CalcFunction
28+
public static function parse(ParserState $oParserState, $bIgnoreCase = false): CSSFunction
2929
{
3030
$aOperators = ['+', '-', '*', '/'];
3131
$sFunction = $oParserState->parseIdentifier();

src/Value/Color.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,10 @@ public function __construct(array $aColor, $iLineNo = 0)
2626
* @param ParserState $oParserState
2727
* @param bool $bIgnoreCase
2828
*
29-
* @return Color|CSSFunction
30-
*
3129
* @throws UnexpectedEOFException
3230
* @throws UnexpectedTokenException
3331
*/
34-
public static function parse(ParserState $oParserState, $bIgnoreCase = false)
32+
public static function parse(ParserState $oParserState, $bIgnoreCase = false): CSSFunction
3533
{
3634
$aColor = [];
3735
if ($oParserState->comes('#')) {

0 commit comments

Comments
 (0)