| Total Complexity | 12 |
| Total Lines | 67 |
| Duplicated Lines | 0 % |
| Changes | 4 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 21 | class Mailcode_Commands_Command_Comment extends Mailcode_Commands_Command implements Mailcode_Commands_Command_Type_Standalone |
||
| 22 | { |
||
| 23 | /** |
||
| 24 | * @var string |
||
| 25 | */ |
||
| 26 | private $commentString = ''; |
||
| 27 | |||
| 28 | protected function init() : void |
||
| 29 | { |
||
| 30 | $this->commentString = trim(trim($this->paramsString), '"'); |
||
| 31 | $this->paramsString = '"Dummy"'; // so the command does not complain that it is empty |
||
| 32 | } |
||
| 33 | |||
| 34 | public function getName() : string |
||
| 35 | { |
||
| 36 | return 'comment'; |
||
| 37 | } |
||
| 38 | |||
| 39 | public function getLabel() : string |
||
| 40 | { |
||
| 41 | return t('Add a comment'); |
||
| 42 | } |
||
| 43 | |||
| 44 | public function supportsType(): bool |
||
| 47 | } |
||
| 48 | |||
| 49 | public function getDefaultType() : string |
||
| 50 | { |
||
| 51 | return ''; |
||
| 52 | } |
||
| 53 | |||
| 54 | public function requiresParameters(): bool |
||
| 57 | } |
||
| 58 | |||
| 59 | public function supportsLogicKeywords() : bool |
||
| 62 | } |
||
| 63 | |||
| 64 | protected function getValidations() : array |
||
| 68 | ); |
||
| 69 | } |
||
| 70 | |||
| 71 | public function generatesContent() : bool |
||
| 72 | { |
||
| 73 | return false; |
||
| 74 | } |
||
| 75 | |||
| 76 | public function getCommentString() : string |
||
| 77 | { |
||
| 78 | return $this->commentString; |
||
| 79 | } |
||
| 80 | |||
| 81 | protected function validateSyntax_comment() : void |
||
| 88 | ); |
||
| 89 | } |
||
| 90 | } |
||
| 92 |