Skip to content

Commit d01f1bb

Browse files
Merge branch '4.4' into 5.2
* 4.4: Backport type fixes uzb translation [DependencyInjection] Fix doc blocks [DependencyInjection] Turn $defaultDeprecationTemplate into a constant [Form] better form doc types to support static analysis
2 parents ca2e8ba + 6153ced commit d01f1bb

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

Caster/LinkStub.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class LinkStub extends ConstStub
2323
private static $vendorRoots;
2424
private static $composerRoots;
2525

26-
public function __construct($label, int $line = 0, $href = null)
26+
public function __construct(string $label, int $line = 0, string $href = null)
2727
{
2828
$this->value = $label;
2929

Caster/ResourceCaster.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public static function castProcess($process, array $a, Stub $stub, bool $isNeste
4848
public static function castStream($stream, array $a, Stub $stub, bool $isNested)
4949
{
5050
$a = stream_get_meta_data($stream) + static::castStreamContext($stream, $a, $stub, $isNested);
51-
if (isset($a['uri'])) {
51+
if ($a['uri'] ?? false) {
5252
$a['uri'] = new LinkStub($a['uri']);
5353
}
5454

Caster/SplCaster.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ public static function castFileInfo(\SplFileInfo $c, array $a, Stub $stub, bool
129129
}
130130
}
131131

132-
if (isset($a[$prefix.'realPath'])) {
132+
if ($a[$prefix.'realPath'] ?? false) {
133133
$a[$prefix.'realPath'] = new LinkStub($a[$prefix.'realPath']);
134134
}
135135

Dumper/HtmlDumper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -985,7 +985,7 @@ private function getSourceLink(string $file, int $line)
985985
}
986986
}
987987

988-
function esc($str)
988+
function esc(string $str)
989989
{
990990
return htmlspecialchars($str, \ENT_QUOTES, 'UTF-8');
991991
}

Server/Connection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public function write(Data $data): bool
7878
return false;
7979
}
8080

81-
private static function nullErrorHandler($t, $m)
81+
private static function nullErrorHandler(int $t, string $m)
8282
{
8383
// no-op
8484
}

0 commit comments

Comments
 (0)