1 | <?php |
||
8 | trait SitePresenter |
||
9 | { |
||
10 | public function getReachableAsEmojiAttribute(): string |
||
14 | |||
15 | public function getFormattedLastUpdatedStatusChangeDateAttribute(): string |
||
19 | |||
20 | public function getFormattedSslCertificateExpirationDateAttribute(): string |
||
24 | |||
25 | public function getChunkedLastFailureReasonAttribute(): string |
||
33 | |||
34 | public function getChunkedLastSslFailureReasonAttribute(): string |
||
42 | |||
43 | protected function formatDate(string $attributeName): string |
||
51 | } |
||
52 |
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: