| Total Complexity | 3 |
| Total Lines | 20 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 28 | class TextWidget extends Widget { |
||
| 29 | |||
| 30 | /** |
||
| 31 | * get html code which is shown on website |
||
| 32 | */ |
||
| 33 | public function getCode() { |
||
| 34 | // TODO: Implement getCode() method. |
||
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * get formular html code which is shown in admin area if user edits the widget |
||
| 39 | */ |
||
| 40 | public function getAdminForm() { |
||
| 41 | // TODO: Implement getAdminForm() method. |
||
| 42 | } |
||
| 43 | |||
| 44 | /** |
||
| 45 | * save widget data when new settings are saved in the admin area |
||
| 46 | */ |
||
| 47 | public function save() { |
||
| 48 | // TODO: Implement save() method. |
||
| 49 | } |
||
| 54 |
Using a closing tag in PHP files that only contain PHP code is not recommended as you might accidentally add whitespace after the closing tag which would then be output by PHP. This can cause severe problems, for example headers cannot be sent anymore.
A simple precaution is to leave off the closing tag as it is not required, and it also has no negative effects whatsoever.