Skip to content

Commit afa440c

Browse files
wouterjnicolas-grekas
authored andcommitted
Add missing return types to magic methods
1 parent 5fcf92e commit afa440c

File tree

5 files changed

+9
-3
lines changed

5 files changed

+9
-3
lines changed

Chunk/ErrorChunk.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,9 @@ public function __sleep(): array
9898
throw new \BadMethodCallException('Cannot serialize '.__CLASS__);
9999
}
100100

101+
/**
102+
* @return void
103+
*/
101104
public function __wakeup()
102105
{
103106
throw new \BadMethodCallException('Cannot unserialize '.__CLASS__);

HttplugClient.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ public function __sleep(): array
251251
throw new \BadMethodCallException('Cannot serialize '.__CLASS__);
252252
}
253253

254-
public function __wakeup()
254+
public function __wakeup(): void
255255
{
256256
throw new \BadMethodCallException('Cannot unserialize '.__CLASS__);
257257
}

Response/AmpResponse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ public function __sleep(): array
144144
throw new \BadMethodCallException('Cannot serialize '.__CLASS__);
145145
}
146146

147-
public function __wakeup()
147+
public function __wakeup(): void
148148
{
149149
throw new \BadMethodCallException('Cannot unserialize '.__CLASS__);
150150
}

Response/CommonResponseTrait.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,9 @@ public function __sleep(): array
122122
throw new \BadMethodCallException('Cannot serialize '.__CLASS__);
123123
}
124124

125+
/**
126+
* @return void
127+
*/
125128
public function __wakeup()
126129
{
127130
throw new \BadMethodCallException('Cannot unserialize '.__CLASS__);

Response/TraceableResponse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function __sleep(): array
4949
throw new \BadMethodCallException('Cannot serialize '.__CLASS__);
5050
}
5151

52-
public function __wakeup()
52+
public function __wakeup(): void
5353
{
5454
throw new \BadMethodCallException('Cannot unserialize '.__CLASS__);
5555
}

0 commit comments

Comments
 (0)