Skip to content

Commit 7a06dfa

Browse files
OskarStarknicolas-grekas
authored andcommitted
[String] Use CPP
1 parent 1cb3ad5 commit 7a06dfa

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

Resources/WcswidthDataGenerator.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,11 @@
2121
*/
2222
final class WcswidthDataGenerator
2323
{
24-
private string $outDir;
2524
private HttpClientInterface $client;
2625

27-
public function __construct(string $outDir)
28-
{
29-
$this->outDir = $outDir;
30-
26+
public function __construct(
27+
private string $outDir,
28+
) {
3129
$this->client = HttpClient::createForBaseUri('https://www.unicode.org/Public/UNIDATA/');
3230
}
3331

Slugger/AsciiSlugger.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ class AsciiSlugger implements SluggerInterface, LocaleAwareInterface
5555
'zh' => 'Han-Latin',
5656
];
5757

58-
private ?string $defaultLocale;
5958
private \Closure|array $symbolsMap = [
6059
'en' => ['@' => 'at', '&' => 'and'],
6160
];
@@ -68,9 +67,10 @@ class AsciiSlugger implements SluggerInterface, LocaleAwareInterface
6867
*/
6968
private array $transliterators = [];
7069

71-
public function __construct(string $defaultLocale = null, array|\Closure $symbolsMap = null)
72-
{
73-
$this->defaultLocale = $defaultLocale;
70+
public function __construct(
71+
private ?string $defaultLocale = null,
72+
array|\Closure $symbolsMap = null,
73+
) {
7474
$this->symbolsMap = $symbolsMap ?? $this->symbolsMap;
7575
}
7676

0 commit comments

Comments
 (0)