| 1 | <?php |
||
| 19 | abstract class AbstractRenderer |
||
| 20 | { |
||
| 21 | 2 | public function setHistory($value) |
|
| 26 | |||
| 27 | 2 | public function getHistory() |
|
| 31 | |||
| 32 | /** |
||
| 33 | * Renders history to string. |
||
| 34 | * @param History $history |
||
| 35 | * @return text |
||
| 36 | */ |
||
| 37 | abstract public function render(History $history); |
||
| 38 | |||
| 39 | 2 | public function addCommitLinks() |
|
| 48 | |||
| 49 | 1 | public function generateHashHref($hash) |
|
| 53 | } |
||
| 54 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: