added function docs

This commit is contained in:
2023-04-01 07:23:16 +10:00
parent a74ace3bbd
commit 8305f16dae

View File

@@ -90,6 +90,13 @@ class PostConductor extends Conductor
return ($user !== null && $user->hasPermission('admin/posts') === true); return ($user !== null && $user->hasPermission('admin/posts') === true);
} }
/**
* Transform the model
*
* @param Model $model The model to transform.
* @return array The transformed model.
* @throws InvalidCastException Cannot cast item to model.
*/
public function transform(Model $model) public function transform(Model $model)
{ {
$result = $model->toArray(); $result = $model->toArray();