for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace NotificationChannels\Evernote;
use DateTime;
class EvernoteMessage
{
/** @var string */
protected $title;
/** @var EvernoteContent */
protected $content;
/** @var array */
protected $tags = [];
/** @var bool */
protected $done = false;
protected $sandbox = false;
/** @var int|null */
protected $reminder;
/**
* @param string $title
*
* @return static
*/
public static function create($title)
return new static($title);
}
public function __construct($title)
$this->title = $title;
* Set the ticket title.
* @return $this
public function title($title)
return $this;
* Set the ticket content.
* @param EvernoteContent $content
public function content(EvernoteContent $content)
$this->content = $content;
* Set the ticket tags.
* @param array $tags
public function tags($tags)
$this->tags = $tags;
* Set the ticket as done.
public function done()
$this->done = true;
* Enable sandbox mode.
public function sandbox()
$this->sandbox = true;
* Set the ticket reminder date.
* @param string|DateTime $reminder
public function reminder($reminder)
if (! $reminder instanceof DateTime) {
$reminder = new DateTime($reminder);
$this->reminder = $reminder->getTimestamp();
* @return array
public function toArray()
return [
'title' => $this->title,
'content' => $this->content ? $this->content->toArray() : null,
'reminder' => $this->reminder,
'sandbox' => $this->sandbox,
'done' => $this->done,
'tags' => $this->tags,
];