Skip to content

Commit

Permalink
Event parameter handling fixed (#322)
Browse files Browse the repository at this point in the history
  • Loading branch information
Webklex committed Aug 24, 2020
1 parent d56d2cc commit d27f53c
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 14 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) princip
### Affected Classes
- NaN

## [1.5.3] - 2020-08-24
### Fixed
- Event parameter handling fixed (#322)

## [1.5.2] - 2020-08-24
### Added
- IDLE like support added (#185)
Expand Down
6 changes: 3 additions & 3 deletions src/IMAP/Events/MessageDeletedEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ class MessageDeletedEvent extends Event {

/**
* Create a new event instance.
* @var Message $message
* @var Message[] $messages
* @return void
*/
public function __construct($message) {
$this->message = $message;
public function __construct($messages) {
$this->message = $messages[0];
}
}
9 changes: 4 additions & 5 deletions src/IMAP/Events/MessageMovedEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,11 @@ class MessageMovedEvent extends Event {

/**
* Create a new event instance.
* @var Message $old_message
* @var Message $new_message
* @var Message[] $messages
* @return void
*/
public function __construct($old_message, $new_message) {
$this->old_message = $old_message;
$this->new_message = $new_message;
public function __construct($messages) {
$this->old_message = $messages[0];
$this->new_message = $messages[1];
}
}
6 changes: 3 additions & 3 deletions src/IMAP/Events/MessageNewEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ class MessageNewEvent extends Event {

/**
* Create a new event instance.
* @var Message $message
* @var Message[] $messages
* @return void
*/
public function __construct($message) {
$this->message = $message;
public function __construct($messages) {
$this->message = $messages[0];
}
}
6 changes: 3 additions & 3 deletions src/IMAP/Events/MessageRestoredEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ class MessageRestoredEvent extends Event {

/**
* Create a new event instance.
* @var Message $message
* @var Message[] $messages
* @return void
*/
public function __construct($message) {
$this->message = $message;
public function __construct($messages) {
$this->message = $messages[0];
}
}

0 comments on commit d27f53c

Please sign in to comment.