| Conditions | 2 |
| Paths | 2 |
| Total Lines | 19 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 26 | public function create(string $snippetName) : Mailcode_Commands_Command_ShowSnippet |
||
| 27 | { |
||
| 28 | $snippetName = $this->instantiator->filterVariableName($snippetName); |
||
| 29 | |||
| 30 | $cmd = $this->commands->createCommand( |
||
| 31 | 'ShowSnippet', |
||
| 32 | '', |
||
| 33 | $snippetName, |
||
| 34 | '{showsnippet:'.$snippetName.'}' |
||
| 35 | ); |
||
| 36 | |||
| 37 | $this->instantiator->checkCommand($cmd); |
||
| 38 | |||
| 39 | if($cmd instanceof Mailcode_Commands_Command_ShowSnippet) |
||
| 40 | { |
||
| 41 | return $cmd; |
||
| 42 | } |
||
| 43 | |||
| 44 | throw $this->instantiator->exceptionUnexpectedType('ShowSnippet', $cmd); |
||
| 45 | } |
||
| 47 |