| 1 | <?php |
||
| 12 | trait DeleteTrait |
||
| 13 | { |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @param null $end string |
||
| 17 | * @return string |
||
| 18 | */ |
||
| 19 | abstract public function endpoint($end = null); |
||
| 20 | |||
| 21 | /** |
||
| 22 | * |
||
| 23 | * Deletes a resource with the supplied data. |
||
| 24 | * |
||
| 25 | * @param $id |
||
| 26 | * @return array|null |
||
| 27 | * @throws \Freshdesk\Exceptions\AccessDeniedException |
||
| 28 | * @throws \Freshdesk\Exceptions\ApiException |
||
| 29 | * @throws \Freshdesk\Exceptions\AuthenticationException |
||
| 30 | * @throws \Freshdesk\Exceptions\ConflictingStateException |
||
| 31 | * @throws \Freshdesk\Exceptions\NotFoundException |
||
| 32 | * @throws \Freshdesk\Exceptions\RateLimitExceededException |
||
| 33 | * @throws \Freshdesk\Exceptions\UnsupportedContentTypeException |
||
| 34 | * @throws \Freshdesk\Exceptions\MethodNotAllowedException |
||
| 35 | * @throws \Freshdesk\Exceptions\UnsupportedAcceptHeaderException |
||
| 36 | * @throws \Freshdesk\Exceptions\ValidationException |
||
| 37 | */ |
||
| 38 | public function delete($id) |
||
| 42 | |||
| 43 | } |
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: