Skip to content

Commit e24d8fc

Browse files
Backport type fixes
1 parent d01f1bb commit e24d8fc

File tree

6 files changed

+18
-23
lines changed

6 files changed

+18
-23
lines changed

Caster/DOMCaster.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public static function castLength($dom, array $a, Stub $stub, bool $isNested)
8282
return $a;
8383
}
8484

85-
public static function castImplementation($dom, array $a, Stub $stub, bool $isNested)
85+
public static function castImplementation(\DOMImplementation $dom, array $a, Stub $stub, bool $isNested)
8686
{
8787
$a += [
8888
Caster::PREFIX_VIRTUAL.'Core' => '1.0',

Caster/RdKafkaCaster.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
*/
3232
class RdKafkaCaster
3333
{
34-
public static function castKafkaConsumer(KafkaConsumer $c, array $a, Stub $stub, $isNested)
34+
public static function castKafkaConsumer(KafkaConsumer $c, array $a, Stub $stub, bool $isNested)
3535
{
3636
$prefix = Caster::PREFIX_VIRTUAL;
3737

@@ -51,7 +51,7 @@ public static function castKafkaConsumer(KafkaConsumer $c, array $a, Stub $stub,
5151
return $a;
5252
}
5353

54-
public static function castTopic(Topic $c, array $a, Stub $stub, $isNested)
54+
public static function castTopic(Topic $c, array $a, Stub $stub, bool $isNested)
5555
{
5656
$prefix = Caster::PREFIX_VIRTUAL;
5757

@@ -75,7 +75,7 @@ public static function castTopicPartition(TopicPartition $c, array $a)
7575
return $a;
7676
}
7777

78-
public static function castMessage(Message $c, array $a, Stub $stub, $isNested)
78+
public static function castMessage(Message $c, array $a, Stub $stub, bool $isNested)
7979
{
8080
$prefix = Caster::PREFIX_VIRTUAL;
8181

@@ -86,7 +86,7 @@ public static function castMessage(Message $c, array $a, Stub $stub, $isNested)
8686
return $a;
8787
}
8888

89-
public static function castConf(Conf $c, array $a, Stub $stub, $isNested)
89+
public static function castConf(Conf $c, array $a, Stub $stub, bool $isNested)
9090
{
9191
$prefix = Caster::PREFIX_VIRTUAL;
9292

@@ -97,7 +97,7 @@ public static function castConf(Conf $c, array $a, Stub $stub, $isNested)
9797
return $a;
9898
}
9999

100-
public static function castTopicConf(TopicConf $c, array $a, Stub $stub, $isNested)
100+
public static function castTopicConf(TopicConf $c, array $a, Stub $stub, bool $isNested)
101101
{
102102
$prefix = Caster::PREFIX_VIRTUAL;
103103

@@ -108,7 +108,7 @@ public static function castTopicConf(TopicConf $c, array $a, Stub $stub, $isNest
108108
return $a;
109109
}
110110

111-
public static function castRdKafka(\RdKafka $c, array $a, Stub $stub, $isNested)
111+
public static function castRdKafka(\RdKafka $c, array $a, Stub $stub, bool $isNested)
112112
{
113113
$prefix = Caster::PREFIX_VIRTUAL;
114114

@@ -121,14 +121,14 @@ public static function castRdKafka(\RdKafka $c, array $a, Stub $stub, $isNested)
121121
return $a;
122122
}
123123

124-
public static function castCollectionMetadata(CollectionMetadata $c, array $a, Stub $stub, $isNested)
124+
public static function castCollectionMetadata(CollectionMetadata $c, array $a, Stub $stub, bool $isNested)
125125
{
126126
$a += iterator_to_array($c);
127127

128128
return $a;
129129
}
130130

131-
public static function castTopicMetadata(TopicMetadata $c, array $a, Stub $stub, $isNested)
131+
public static function castTopicMetadata(TopicMetadata $c, array $a, Stub $stub, bool $isNested)
132132
{
133133
$prefix = Caster::PREFIX_VIRTUAL;
134134

@@ -140,7 +140,7 @@ public static function castTopicMetadata(TopicMetadata $c, array $a, Stub $stub,
140140
return $a;
141141
}
142142

143-
public static function castPartitionMetadata(PartitionMetadata $c, array $a, Stub $stub, $isNested)
143+
public static function castPartitionMetadata(PartitionMetadata $c, array $a, Stub $stub, bool $isNested)
144144
{
145145
$prefix = Caster::PREFIX_VIRTUAL;
146146

@@ -153,7 +153,7 @@ public static function castPartitionMetadata(PartitionMetadata $c, array $a, Stu
153153
return $a;
154154
}
155155

156-
public static function castBrokerMetadata(BrokerMetadata $c, array $a, Stub $stub, $isNested)
156+
public static function castBrokerMetadata(BrokerMetadata $c, array $a, Stub $stub, bool $isNested)
157157
{
158158
$prefix = Caster::PREFIX_VIRTUAL;
159159

Caster/ResourceCaster.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public static function castStreamContext($stream, array $a, Stub $stub, bool $is
6060
return @stream_context_get_params($stream) ?: $a;
6161
}
6262

63-
public static function castGd($gd, array $a, Stub $stub, $isNested)
63+
public static function castGd($gd, array $a, Stub $stub, bool $isNested)
6464
{
6565
$a['size'] = imagesx($gd).'x'.imagesy($gd);
6666
$a['trueColor'] = imageistruecolor($gd);

Caster/SplCaster.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public static function castArrayIterator(\ArrayIterator $c, array $a, Stub $stub
3939
return self::castSplArray($c, $a, $stub, $isNested);
4040
}
4141

42-
public static function castHeap(\Iterator $c, array $a, Stub $stub, $isNested)
42+
public static function castHeap(\Iterator $c, array $a, Stub $stub, bool $isNested)
4343
{
4444
$a += [
4545
Caster::PREFIX_VIRTUAL.'heap' => iterator_to_array(clone $c),

Dumper/CliDumper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ public function leaveHash(Cursor $cursor, int $type, $class, bool $hasChild, int
324324
* @param bool $hasChild When the dump of the hash has child item
325325
* @param int $cut The number of items the hash has been cut by
326326
*/
327-
protected function dumpEllipsis(Cursor $cursor, $hasChild, $cut)
327+
protected function dumpEllipsis(Cursor $cursor, bool $hasChild, int $cut)
328328
{
329329
if ($cut) {
330330
$this->line .= '';
@@ -428,7 +428,7 @@ protected function dumpKey(Cursor $cursor)
428428
*
429429
* @return string The value with style decoration
430430
*/
431-
protected function style($style, $value, $attr = [])
431+
protected function style(string $style, string $value, array $attr = [])
432432
{
433433
if (null === $this->colors) {
434434
$this->colors = $this->supportsColors();

Dumper/HtmlDumper.php

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -116,21 +116,16 @@ public function setDisplayOptions(array $displayOptions)
116116

117117
/**
118118
* Sets an HTML header that will be dumped once in the output stream.
119-
*
120-
* @param string $header An HTML string
121119
*/
122-
public function setDumpHeader($header)
120+
public function setDumpHeader(string $header)
123121
{
124122
$this->dumpHeader = $header;
125123
}
126124

127125
/**
128126
* Sets an HTML prefix and suffix that will encapse every single dump.
129-
*
130-
* @param string $prefix The prepended HTML string
131-
* @param string $suffix The appended HTML string
132127
*/
133-
public function setDumpBoundaries($prefix, $suffix)
128+
public function setDumpBoundaries(string $prefix, string $suffix)
134129
{
135130
$this->dumpPrefix = $prefix;
136131
$this->dumpSuffix = $suffix;
@@ -851,7 +846,7 @@ public function leaveHash(Cursor $cursor, int $type, $class, bool $hasChild, int
851846
/**
852847
* {@inheritdoc}
853848
*/
854-
protected function style($style, $value, $attr = [])
849+
protected function style(string $style, string $value, array $attr = [])
855850
{
856851
if ('' === $value) {
857852
return '';

0 commit comments

Comments
 (0)