| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | public function getCertificateStatusAsEmojiAttribute(): string |
||
| 25 | { |
||
| 26 | if ($this->certificate_status === CertificateStatus::VALID) { |
||
| 27 | return Emoji::ok(); |
||
| 28 | } |
||
| 29 | |||
| 30 | if ($this->certificate_status === CertificateStatus::INVALID) { |
||
| 31 | return Emoji::notOk(); |
||
| 32 | } |
||
| 33 | |||
| 34 | return ''; |
||
| 35 | } |
||
| 36 | |||
| 74 |
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: