1 | <?php |
||
9 | class Issue |
||
10 | { |
||
11 | /** |
||
12 | * The title of the issue. |
||
13 | * |
||
14 | * @var string |
||
15 | */ |
||
16 | protected $title; |
||
17 | |||
18 | /** |
||
19 | * The body of the issue. |
||
20 | * |
||
21 | * @var string |
||
22 | */ |
||
23 | protected $body; |
||
24 | |||
25 | /** |
||
26 | * Create a new class instance. |
||
27 | * |
||
28 | * @param Exception $e |
||
29 | */ |
||
30 | public function __construct(Exception $e) |
||
35 | |||
36 | /** |
||
37 | * Create issue on the given service. |
||
38 | * |
||
39 | * @param \FlyingLuscas\Laker\Contracts\ServiceContract $service |
||
40 | * |
||
41 | * @return void |
||
42 | */ |
||
43 | public function createOn(ServiceContract $service) |
||
47 | |||
48 | /** |
||
49 | * Get the body of the issue from an exception. |
||
50 | * |
||
51 | * @param Exception $e |
||
52 | * |
||
53 | * @return string |
||
54 | */ |
||
55 | private function getIssueBodyFromException(Exception $e) |
||
59 | |||
60 | /** |
||
61 | * Get the title of the issue from an exception. |
||
62 | * |
||
63 | * @param Exception $e |
||
64 | * |
||
65 | * @return string |
||
66 | */ |
||
67 | private function getIssueTitleFromException(Exception $e) |
||
73 | |||
74 | /** |
||
75 | * Set the title of the issue. |
||
76 | * |
||
77 | * @param string $title |
||
78 | * |
||
79 | * @return self |
||
80 | */ |
||
81 | public function setTitle($title) |
||
87 | |||
88 | /** |
||
89 | * Set the body of the issue. |
||
90 | * |
||
91 | * @param string $body |
||
92 | * |
||
93 | * @return self |
||
94 | */ |
||
95 | public function setBody($body) |
||
101 | |||
102 | /** |
||
103 | * Get the issue title. |
||
104 | * |
||
105 | * @return string |
||
106 | */ |
||
107 | public function getTitle() |
||
111 | |||
112 | /** |
||
113 | * Get the body of the issue. |
||
114 | * |
||
115 | * @return string |
||
116 | */ |
||
117 | public function getBody() |
||
121 | } |
||
122 |