Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fix message created/updated initialization #1

Merged
merged 1 commit into from

2 participants

Olivier Paradis Thomas
Olivier Paradis

Moves the created/updated initialization into the Model\Message class.

Thomas rande merged commit 87e0394 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 3, 2012
  1. Fix message created/updated initialization

    Olivier Paradis authored
This page is out of date. Refresh to see the latest.
1  Backend/AMQPBackend.php
View
@@ -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;
}
6 Entity/Message.php
View
@@ -20,12 +20,6 @@ class Message extends BaseMessage
*/
protected $id;
- public function __construct()
- {
- $this->createdAt = new \DateTime();
- $this->updatedAt = new \DateTime();
- }
-
/**
* Get id
*
6 Model/Message.php
View
@@ -29,6 +29,12 @@ class Message implements MessageInterface
protected $completedAt;
+ public function __construct()
+ {
+ $this->createdAt = new \DateTime();
+ $this->updatedAt = new \DateTime();
+ }
+
/**
* {@inheritdoc}
*/
Something went wrong with that request. Please try again.