Skip to content

Commit ef88010

Browse files
committed
[String] Add types to private properties
Signed-off-by: Alexander M. Turek <me@derrabus.de>
1 parent 8491090 commit ef88010

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

LazyString.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
*/
1919
class LazyString implements \Stringable, \JsonSerializable
2020
{
21-
private $value;
21+
private \Closure|string $value;
2222

2323
/**
2424
* @param callable|array $callback A callable or a [Closure, method] lazy-callable

Resources/WcswidthDataGenerator.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414
use Symfony\Component\HttpClient\HttpClient;
1515
use Symfony\Component\String\Exception\RuntimeException;
1616
use Symfony\Component\VarExporter\VarExporter;
17+
use Symfony\Contracts\HttpClient\HttpClientInterface;
1718

1819
/**
1920
* @internal
2021
*/
2122
final class WcswidthDataGenerator
2223
{
23-
private $outDir;
24-
25-
private $client;
24+
private string $outDir;
25+
private HttpClientInterface $client;
2626

2727
public function __construct(string $outDir)
2828
{

Slugger/AsciiSlugger.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ class AsciiSlugger implements SluggerInterface, LocaleAwareInterface
5454
'zh' => 'Han-Latin',
5555
];
5656

57-
private $defaultLocale;
58-
private $symbolsMap = [
57+
private ?string $defaultLocale;
58+
private \Closure|array $symbolsMap = [
5959
'en' => ['@' => 'at', '&' => 'and'],
6060
];
6161

@@ -64,7 +64,7 @@ class AsciiSlugger implements SluggerInterface, LocaleAwareInterface
6464
*
6565
* @var \Transliterator[]
6666
*/
67-
private $transliterators = [];
67+
private array $transliterators = [];
6868

6969
public function __construct(string $defaultLocale = null, array|\Closure $symbolsMap = null)
7070
{

0 commit comments

Comments
 (0)