1 | <?php |
||
7 | class PivotalTrackerMessage |
||
8 | { |
||
9 | /** @var string */ |
||
10 | protected $name; |
||
11 | |||
12 | /** @var string */ |
||
13 | protected $description; |
||
14 | |||
15 | /** @var string */ |
||
16 | protected $type = 'chore'; |
||
17 | |||
18 | /** @var array list of labels (strings list) */ |
||
19 | protected $labels = []; |
||
20 | |||
21 | /** |
||
22 | * @param string $name |
||
23 | * |
||
24 | * @return static |
||
25 | */ |
||
26 | public static function create($name = '') |
||
30 | |||
31 | /** |
||
32 | * @param string $name |
||
33 | */ |
||
34 | public function __construct($name = '') |
||
38 | |||
39 | /** |
||
40 | * Set the story name. |
||
41 | * |
||
42 | * @param $name |
||
43 | * |
||
44 | * @return $this |
||
45 | */ |
||
46 | public function name($name) |
||
52 | |||
53 | /** |
||
54 | * Set the story description. |
||
55 | * |
||
56 | * @param $description |
||
57 | * |
||
58 | * @return $this |
||
59 | */ |
||
60 | public function description($description) |
||
66 | |||
67 | /** |
||
68 | * Set the story type. |
||
69 | * |
||
70 | * @param string $type |
||
71 | * |
||
72 | * @return $this |
||
73 | * |
||
74 | * @throws CouldNotCreateMessage |
||
75 | */ |
||
76 | public function type($type) |
||
86 | |||
87 | /** |
||
88 | * Set the story labels. |
||
89 | * |
||
90 | * @param array|mixed |
||
91 | * |
||
92 | * @return $this |
||
93 | * |
||
94 | * @throws CouldNotCreateMessage |
||
95 | */ |
||
96 | public function labels($labels) |
||
102 | |||
103 | /** |
||
104 | * @return array |
||
105 | */ |
||
106 | public function toArray() |
||
115 | } |
||
116 |