Skip to content

Commit 318cd80

Browse files
authored
Merge pull request #197 from alexei-bykovski/fix-PHP-8.1-deprecation-notices
Fix PHP 8.1 return type deprecation notices.
2 parents 11e39a5 + e8863de commit 318cd80

File tree

4 files changed

+27
-0
lines changed

4 files changed

+27
-0
lines changed

Diff for: src/Message/MessagePart.php

+9
Original file line numberDiff line numberDiff line change
@@ -57,18 +57,27 @@ public function __construct(PartStreamContainer $streamContainer, IMimePart $par
5757
$this->observers = new SplObjectStorage();
5858
}
5959

60+
/**
61+
* @return void
62+
*/
6063
#[\ReturnTypeWillChange]
6164
public function attach(SplObserver $observer)
6265
{
6366
$this->observers->attach($observer);
6467
}
6568

69+
/**
70+
* @return void
71+
*/
6672
#[\ReturnTypeWillChange]
6773
public function detach(SplObserver $observer)
6874
{
6975
$this->observers->detach($observer);
7076
}
7177

78+
/**
79+
* @return void
80+
*/
7281
#[\ReturnTypeWillChange]
7382
public function notify()
7483
{

Diff for: src/Message/PartChildrenContainer.php

+12
Original file line numberDiff line numberDiff line change
@@ -131,18 +131,27 @@ public function remove(IMessagePart $part)
131131
return null;
132132
}
133133

134+
/**
135+
* @return bool
136+
*/
134137
#[\ReturnTypeWillChange]
135138
public function offsetExists($offset)
136139
{
137140
return isset($this->children[$offset]);
138141
}
139142

143+
/**
144+
* @return mixed
145+
*/
140146
#[\ReturnTypeWillChange]
141147
public function offsetGet($offset)
142148
{
143149
return $this->offsetExists($offset) ? $this->children[$offset] : null;
144150
}
145151

152+
/**
153+
* @return void
154+
*/
146155
#[\ReturnTypeWillChange]
147156
public function offsetSet($offset, $value)
148157
{
@@ -158,6 +167,9 @@ public function offsetSet($offset, $value)
158167
}
159168
}
160169

170+
/**
171+
* @return void
172+
*/
161173
#[\ReturnTypeWillChange]
162174
public function offsetUnset($offset)
163175
{

Diff for: src/Parser/Part/ParserPartStreamContainer.php

+3
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,9 @@ public function getStream()
143143
return parent::getStream();
144144
}
145145

146+
/**
147+
* @return void
148+
*/
146149
#[\ReturnTypeWillChange]
147150
public function update(SplSubject $subject)
148151
{

Diff for: src/Stream/MessagePartStream.php

+3
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ public function __destruct()
5959
}
6060
}
6161

62+
/**
63+
* @return void
64+
*/
6265
#[\ReturnTypeWillChange]
6366
public function update(SplSubject $subject)
6467
{

0 commit comments

Comments
 (0)