Skip to content

Commit 86dc7a7

Browse files
committed
Resolve PHPStan warnings
1 parent ad9cb11 commit 86dc7a7

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

src/Value/CSSFunction.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@
1717
class CSSFunction extends ValueList
1818
{
1919
/**
20-
* @var non-empty-string
20+
* @var string
2121
*
2222
* @internal since 8.8.0
2323
*/
2424
protected $name;
2525

2626
/**
27-
* @param non-empty-string $name
27+
* @param string $name
2828
* @param RuleValueList|array<Value|string> $arguments
2929
* @param non-empty-string $separator
3030
* @param int<1, max>|null $lineNumber

src/Value/Expression.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
namespace Sabberworm\CSS\Value;
66

77
use Sabberworm\CSS\Parsing\ParserState;
8+
use Sabberworm\CSS\Parsing\SourceException;
89

910
/**
1011
* An `Expression` represents a special kind of value that is comprised of multiple components wrapped in parenthesis.
@@ -14,10 +15,8 @@ class Expression extends CSSFunction
1415
{
1516
/**
1617
* @throws SourceException
17-
* @throws UnexpectedEOFException
18-
* @throws UnexpectedTokenException
1918
*/
20-
public static function parse(ParserState $oParserState, bool $bIgnoreCase = false): Expression
19+
public static function parse(ParserState $oParserState, bool $bIgnoreCase = false): CSSFunction
2120
{
2221
$oParserState->consume('(');
2322
$aArguments = parent::parseArguments($oParserState);

tests/Unit/Value/ExpressionTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
final class ExpressionTest extends TestCase
2020
{
2121
/**
22-
* @return array<0, array{string: string}>
22+
* @return list<array{input: non-empty-string, expected_output: non-empty-string, expression_index: int}>
2323
*/
2424
public static function provideExpressions(): array
2525
{
@@ -54,6 +54,9 @@ public function parseExpressions(string $input, string $expected, int $expressio
5454
self::assertSame($expected, $val->render(OutputFormat::createCompact()));
5555
}
5656

57+
/**
58+
* @return list<non-empty-string>
59+
*/
5760
private function getDelimiters(string $rule): array
5861
{
5962
$closure = function ($rule) {

0 commit comments

Comments
 (0)