Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions lib/Horde/Mail/Mbox/Parse.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,15 @@ public function __construct($data, $limit = null)

/**
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->_parsed[$offset]);
}

/**
*/
#[\ReturnTypeWillChange]
public function offsetGet($offset)
{
if (!isset($this->_parsed[$offset])) {
Expand Down Expand Up @@ -179,13 +181,15 @@ public function offsetGet($offset)

/**
*/
#[\ReturnTypeWillChange]
public function offsetSet($offset, $value)
{
// NOOP
}

/**
*/
#[\ReturnTypeWillChange]
public function offsetUnset($offset)
{
// NOOP
Expand All @@ -198,6 +202,7 @@ public function offsetUnset($offset)
*
* @return integer The number of messages.
*/
#[\ReturnTypeWillChange]
public function count()
{
return count($this->_parsed);
Expand All @@ -218,6 +223,7 @@ public function __toString()

/* Iterator methods. */

#[\ReturnTypeWillChange]
public function current()
{
$key = $this->key();
Expand All @@ -227,23 +233,27 @@ public function current()
: $this[$key];
}

#[\ReturnTypeWillChange]
public function key()
{
return key($this->_parsed);
}

#[\ReturnTypeWillChange]
public function next()
{
if ($this->valid()) {
next($this->_parsed);
}
}

#[\ReturnTypeWillChange]
public function rewind()
{
reset($this->_parsed);
}

#[\ReturnTypeWillChange]
public function valid()
{
return !is_null($this->key());
Expand Down
1 change: 1 addition & 0 deletions lib/Horde/Mail/Rfc822/Group.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ public function match($ob)
*
* @return integer The number of addresses.
*/
#[\ReturnTypeWillChange]
public function count()
{
return count($this->addresses);
Expand Down
11 changes: 11 additions & 0 deletions lib/Horde/Mail/Rfc822/List.php
Original file line number Diff line number Diff line change
Expand Up @@ -331,13 +331,15 @@ protected function _normalize($obs)

/**
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return !is_null($this[$offset]);
}

/**
*/
#[\ReturnTypeWillChange]
public function offsetGet($offset)
{
try {
Expand All @@ -350,6 +352,7 @@ public function offsetGet($offset)

/**
*/
#[\ReturnTypeWillChange]
public function offsetSet($offset, $value)
{
if ($ob = $this[$offset]) {
Expand All @@ -367,6 +370,7 @@ public function offsetSet($offset, $value)

/**
*/
#[\ReturnTypeWillChange]
public function offsetUnset($offset)
{
if ($ob = $this[$offset]) {
Expand All @@ -387,13 +391,15 @@ public function offsetUnset($offset)
*
* @return integer The number of addresses.
*/
#[\ReturnTypeWillChange]
public function count()
{
return count($this->addresses);
}

/* Iterator methods. */

#[\ReturnTypeWillChange]
public function current()
{
if (!$this->valid()) {
Expand All @@ -407,11 +413,13 @@ public function current()
: $ob->addresses[$this->_ptr['subidx']];
}

#[\ReturnTypeWillChange]
public function key()
{
return $this->_ptr['key'];
}

#[\ReturnTypeWillChange]
public function next()
{
if (is_null($this->_ptr['subidx'])) {
Expand All @@ -437,6 +445,7 @@ public function next()
}
}

#[\ReturnTypeWillChange]
public function rewind()
{
$this->_ptr = array(
Expand All @@ -453,11 +462,13 @@ public function rewind()
}
}

#[\ReturnTypeWillChange]
public function valid()
{
return (!empty($this->_ptr) && isset($this->_data[$this->_ptr['idx']]));
}

#[\ReturnTypeWillChange]
public function seek($position)
{
if (!$this->valid() ||
Expand Down