1 | <?php |
||
9 | class TodoistMessage |
||
10 | { |
||
11 | /** @var string */ |
||
12 | protected $content; |
||
13 | |||
14 | /** @var int|string */ |
||
15 | protected $projectId; |
||
16 | |||
17 | /** @var int */ |
||
18 | protected $priority; |
||
19 | |||
20 | /** @var int */ |
||
21 | protected $indent; |
||
22 | |||
23 | /** @var int */ |
||
24 | protected $itemOrder; |
||
25 | |||
26 | /** @var bool */ |
||
27 | protected $collapsed; |
||
28 | |||
29 | /** @var string|null */ |
||
30 | protected $due; |
||
31 | |||
32 | /** |
||
33 | * @param string $content |
||
34 | * |
||
35 | * @return static |
||
36 | */ |
||
37 | 1 | public static function create($content) |
|
41 | |||
42 | /** |
||
43 | * @param string $content |
||
44 | */ |
||
45 | 21 | public function __construct($content) |
|
49 | |||
50 | /** |
||
51 | * Set the ticket content. |
||
52 | * |
||
53 | * @param string $content |
||
54 | * |
||
55 | * @return $this |
||
56 | */ |
||
57 | 1 | public function content($content) |
|
63 | |||
64 | /** |
||
65 | * Set the ticket project_id. |
||
66 | * |
||
67 | * @param int $projectId |
||
68 | * |
||
69 | * @return $this |
||
70 | */ |
||
71 | 1 | public function projectId($projectId) |
|
77 | |||
78 | /** |
||
79 | * Set the ticket priority. |
||
80 | * |
||
81 | * @param int $priority |
||
82 | * |
||
83 | * @throws CouldNotCreateMessage |
||
84 | * |
||
85 | * @return $this |
||
86 | */ |
||
87 | 7 | public function priority($priority) |
|
96 | |||
97 | /** |
||
98 | * Set the ticket indent. |
||
99 | * |
||
100 | * @param int $indent |
||
101 | * |
||
102 | * @throws CouldNotCreateMessage |
||
103 | * |
||
104 | * @return $this |
||
105 | */ |
||
106 | 5 | public function indent($indent) |
|
115 | |||
116 | /** |
||
117 | * Set the ticket item order. |
||
118 | * |
||
119 | * @param int $itemOrder |
||
120 | * |
||
121 | * @return $this |
||
122 | */ |
||
123 | 1 | public function itemOrder($itemOrder) |
|
129 | |||
130 | /** |
||
131 | * Set the ticket as collapsed. |
||
132 | * |
||
133 | * @return $this |
||
134 | */ |
||
135 | 1 | public function collapsed() |
|
141 | |||
142 | /** |
||
143 | * Set the card position due date. |
||
144 | * |
||
145 | * @param string|DateTime $due |
||
146 | * |
||
147 | * @return $this |
||
148 | */ |
||
149 | 2 | public function due($due) |
|
161 | |||
162 | /** |
||
163 | * @return array |
||
164 | */ |
||
165 | 19 | public function toArray() |
|
182 | } |
||
183 |