Skip to content

Commit 4312c56

Browse files
authored
[TASK] Add native type declarations for Charset (#1178)
Part of #811
1 parent dc3b9cb commit 4312c56

File tree

3 files changed

+3
-15
lines changed

3 files changed

+3
-15
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Please also have a look at our
3434
- Use more native type declarations and strict mode
3535
(#641, #772, #774, #778, #804, #841, #873, #875, #891, #922, #923, #933, #958,
3636
#964, #967, #1000, #1044, #1134, #1136, #1137, #1139, #1140, #1141, #1145,
37-
#1162, #1163, #1166, #1172, #1174)
37+
#1162, #1163, #1166, #1172, #1174, #1178)
3838
- Add visibility to all class/interface constants (#469)
3939

4040
### Deprecated

config/phpstan-baseline.neon

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,6 @@ parameters:
5454
count: 1
5555
path: ../src/Property/CSSNamespace.php
5656

57-
-
58-
message: '#^Method Sabberworm\\CSS\\Property\\Charset\:\:atRuleArgs\(\) should return string but returns Sabberworm\\CSS\\Value\\CSSString\.$#'
59-
identifier: return.type
60-
count: 1
61-
path: ../src/Property/Charset.php
62-
6357
-
6458
message: '#^Only booleans are allowed in an if condition, Sabberworm\\CSS\\Value\\RuleValueList\|string\|null given\.$#'
6559
identifier: if.condNotBoolean

src/Property/Charset.php

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,7 @@ public function setCharset($charset): void
6363
$this->charset = $charset;
6464
}
6565

66-
/**
67-
* @return string
68-
*/
69-
public function getCharset()
66+
public function getCharset(): string
7067
{
7168
return $this->charset->getString();
7269
}
@@ -92,10 +89,7 @@ public function atRuleName(): string
9289
return 'charset';
9390
}
9491

95-
/**
96-
* @return string
97-
*/
98-
public function atRuleArgs()
92+
public function atRuleArgs(): CSSString
9993
{
10094
return $this->charset;
10195
}

0 commit comments

Comments
 (0)