| 1 | <?php |
||
| 23 | trait LookupAssociationTrait |
||
| 24 | { |
||
| 25 | /** |
||
| 26 | * HTTP not found response code |
||
| 27 | * |
||
| 28 | * @return int |
||
| 29 | */ |
||
| 30 | protected function statusCodeNotFound(): int |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @return string |
||
| 37 | */ |
||
| 38 | protected function messageNotFound(): string |
||
| 42 | |||
| 43 | /** |
||
| 44 | * @return null |
||
| 45 | * @throws HttpException |
||
| 46 | */ |
||
| 47 | protected function handleNotFoundResponse() |
||
| 54 | |||
| 55 | /** |
||
| 56 | * @param string|int $identifier |
||
| 57 | * @return ORganization|null |
||
| 58 | */ |
||
| 59 | protected function findOrganization($identifier) |
||
| 63 | |||
| 64 | /** |
||
| 65 | * @param string|int $identifier |
||
| 66 | * @return User|null |
||
| 67 | */ |
||
| 68 | protected function findUser($identifier) |
||
| 76 | } |
||
| 77 |
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: