Skip to content

Commit e1fa3b6

Browse files
authored
[TASK] Use native types in Settings (#933)
1 parent 2ad6f00 commit e1fa3b6

File tree

2 files changed

+5
-14
lines changed

2 files changed

+5
-14
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Please also have a look at our
2626
- Only allow `string` for some `OutputFormat` properties (#885)
2727
- Make all non-private properties `@internal` (#886)
2828
- Use more native type declarations and strict mode
29-
(#641, #772, #774, #778, #804, #841, #873, #875, #891, #922, #923)
29+
(#641, #772, #774, #778, #804, #841, #873, #875, #891, #922, #923, #933)
3030
- Add visibility to all class/interface constants (#469)
3131

3232
### Deprecated

src/Settings.php

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,7 @@ private function __construct()
4646
$this->bMultibyteSupport = \extension_loaded('mbstring');
4747
}
4848

49-
/**
50-
* @return self new instance
51-
*/
52-
public static function create(): Settings
49+
public static function create(): self
5350
{
5451
return new Settings();
5552
}
@@ -60,11 +57,9 @@ public static function create(): Settings
6057
* If `true` (`mbstring` extension must be enabled), will use (slower) `mb_strlen`, `mb_convert_case`, `mb_substr`
6158
* and `mb_strpos` functions. Otherwise, the normal (ASCII-Only) functions will be used.
6259
*
63-
* @param bool $bMultibyteSupport
64-
*
6560
* @return $this fluent interface
6661
*/
67-
public function withMultibyteSupport($bMultibyteSupport = true): self
62+
public function withMultibyteSupport(bool $bMultibyteSupport = true): self
6863
{
6964
$this->bMultibyteSupport = $bMultibyteSupport;
7065
return $this;
@@ -73,11 +68,9 @@ public function withMultibyteSupport($bMultibyteSupport = true): self
7368
/**
7469
* Sets the charset to be used if the CSS does not contain an `@charset` declaration.
7570
*
76-
* @param string $sDefaultCharset
77-
*
7871
* @return $this fluent interface
7972
*/
80-
public function withDefaultCharset($sDefaultCharset): self
73+
public function withDefaultCharset(string $sDefaultCharset): self
8174
{
8275
$this->sDefaultCharset = $sDefaultCharset;
8376
return $this;
@@ -86,11 +79,9 @@ public function withDefaultCharset($sDefaultCharset): self
8679
/**
8780
* Configures whether the parser should silently ignore invalid rules.
8881
*
89-
* @param bool $usesLenientParsing
90-
*
9182
* @return $this fluent interface
9283
*/
93-
public function withLenientParsing($usesLenientParsing = true): self
84+
public function withLenientParsing(bool $usesLenientParsing = true): self
9485
{
9586
$this->bLenientParsing = $usesLenientParsing;
9687
return $this;

0 commit comments

Comments
 (0)