| Total Complexity | 4 |
| Total Lines | 31 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 8 | class Answer |
||
| 9 | { |
||
| 10 | private Command $command; |
||
| 11 | private string $question; |
||
| 12 | private string $answer; |
||
| 13 | |||
| 14 | public function __construct(string $prompt, string $question, string $answer) |
||
| 15 | { |
||
| 16 | $this->command = CommandFactory::fromArray([ |
||
| 17 | CommandFactory::CONFIG_FIELD_NAME => 'forrest-ai', |
||
| 18 | CommandFactory::CONFIG_FIELD_DESCRIPTION => 'Answer to: ' . $question, |
||
| 19 | CommandFactory::CONFIG_FIELD_PROMPT => $prompt |
||
| 20 | ]); |
||
| 21 | |||
| 22 | $this->question = $question; |
||
| 23 | $this->answer = $answer; |
||
| 24 | } |
||
| 25 | |||
| 26 | public function getCommand(): Command |
||
| 27 | { |
||
| 28 | return $this->command; |
||
| 29 | } |
||
| 30 | |||
| 31 | public function getQuestion(): string |
||
| 32 | { |
||
| 33 | return $this->question; |
||
| 34 | } |
||
| 35 | |||
| 36 | public function getAnswer(): string |
||
| 39 | } |
||
| 40 | } |
||
| 41 |