Skip to content
This repository has been archived by the owner on Jul 28, 2022. It is now read-only.

Fix message created/updated initialization #1

Merged
merged 1 commit into from Apr 4, 2012
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion Backend/AMQPBackend.php
Expand Up @@ -124,7 +124,6 @@ public function create($type, array $body)
$message->setType($type);
$message->setBody($body);
$message->setState(MessageInterface::STATE_OPEN);
$message->setCreatedAt(new \DateTime);

return $message;
}
Expand Down
6 changes: 0 additions & 6 deletions Entity/Message.php
Expand Up @@ -20,12 +20,6 @@ class Message extends BaseMessage
*/
protected $id;

public function __construct()
{
$this->createdAt = new \DateTime();
$this->updatedAt = new \DateTime();
}

/**
* Get id
*
Expand Down
6 changes: 6 additions & 0 deletions Model/Message.php
Expand Up @@ -29,6 +29,12 @@ class Message implements MessageInterface

protected $completedAt;

public function __construct()
{
$this->createdAt = new \DateTime();
$this->updatedAt = new \DateTime();
}

/**
* {@inheritdoc}
*/
Expand Down