| 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 bool |
||
| 42 | */ |
||
| 43 | public function createOn(ServiceContract $service) |
||
| 47 | |||
| 48 | /** |
||
| 49 | * Get the title of the issue from an exception. |
||
| 50 | * |
||
| 51 | * @param Exception $e |
||
| 52 | * |
||
| 53 | * @return string |
||
| 54 | */ |
||
| 55 | private function getIssueTitleFromException(Exception $e) |
||
| 61 | |||
| 62 | /** |
||
| 63 | * Set the title of the issue. |
||
| 64 | * |
||
| 65 | * @param string $title |
||
| 66 | * |
||
| 67 | * @return self |
||
| 68 | */ |
||
| 69 | public function setTitle($title) |
||
| 75 | |||
| 76 | /** |
||
| 77 | * Set the body of the issue. |
||
| 78 | * |
||
| 79 | * @param string $body |
||
| 80 | * |
||
| 81 | * @return self |
||
| 82 | */ |
||
| 83 | public function setBody($body) |
||
| 89 | |||
| 90 | /** |
||
| 91 | * Get the issue title. |
||
| 92 | * |
||
| 93 | * @return string |
||
| 94 | */ |
||
| 95 | public function getTitle() |
||
| 99 | |||
| 100 | /** |
||
| 101 | * Get the body of the issue. |
||
| 102 | * |
||
| 103 | * @return string |
||
| 104 | */ |
||
| 105 | public function getBody() |
||
| 109 | } |
||
| 110 |