| Conditions | 2 |
| Paths | 2 |
| Total Lines | 20 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 23 | public function comment(string $comments) : Mailcode_Commands_Command_Comment |
||
| 24 | { |
||
| 25 | $cmd = Mailcode::create()->getCommands()->createCommand( |
||
| 26 | 'Comment', |
||
| 27 | '', // type |
||
| 28 | $comments, // params |
||
| 29 | sprintf( |
||
| 30 | '{comment: %s}', |
||
| 31 | $comments |
||
| 32 | ) |
||
| 33 | ); |
||
| 34 | |||
| 35 | $this->instantiator->checkCommand($cmd); |
||
| 36 | |||
| 37 | if($cmd instanceof Mailcode_Commands_Command_Comment) |
||
| 38 | { |
||
| 39 | return $cmd; |
||
| 40 | } |
||
| 41 | |||
| 42 | throw $this->instantiator->exceptionUnexpectedType('Comment', $cmd); |
||
| 43 | } |
||
| 45 |