Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: PHPDoc types in controller.tpl.php #8561

Merged
merged 5 commits into from
Feb 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 32 additions & 24 deletions system/Commands/Generators/Views/controller.tpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class {class} extends {extends}
{
<?php if ($type === 'controller'): ?>
/**
* Return an array of resource objects, themselves in array format
* Return an array of resource objects, themselves in array format.
*
* @return ResponseInterface
*/
Expand All @@ -19,7 +19,9 @@ public function index()
}

/**
* Return the properties of a resource object
* Return the properties of a resource object.
*
* @param int|string|null $id
*
* @return ResponseInterface
*/
Expand All @@ -29,7 +31,7 @@ public function show($id = null)
}

/**
* Return a new resource object, with default properties
* Return a new resource object, with default properties.
*
* @return ResponseInterface
*/
Expand All @@ -39,7 +41,7 @@ public function new()
}

/**
* Create a new resource object, from "posted" parameters
* Create a new resource object, from "posted" parameters.
*
* @return ResponseInterface
*/
Expand All @@ -49,7 +51,9 @@ public function create()
}

/**
* Return the editable properties of a resource object
* Return the editable properties of a resource object.
*
* @param int|string|null $id
*
* @return ResponseInterface
*/
Expand All @@ -59,7 +63,9 @@ public function edit($id = null)
}

/**
* Add or update a model resource, from "posted" properties
* Add or update a model resource, from "posted" properties.
*
* @param int|string|null $id
*
* @return ResponseInterface
*/
Expand All @@ -69,7 +75,9 @@ public function update($id = null)
}

/**
* Delete the designated resource object from the model
* Delete the designated resource object from the model.
*
* @param int|string|null $id
*
* @return ResponseInterface
*/
Expand All @@ -79,7 +87,7 @@ public function delete($id = null)
}
<?php elseif ($type === 'presenter'): ?>
/**
* Present a view of resource objects
* Present a view of resource objects.
*
* @return ResponseInterface
*/
Expand All @@ -89,9 +97,9 @@ public function index()
}

/**
* Present a view to present a specific resource object
* Present a view to present a specific resource object.
*
* @param string $id
* @param int|string|null $id
*
* @return ResponseInterface
*/
Expand All @@ -101,9 +109,9 @@ public function show($id = null)
}

/**
* Present a view to present a new single resource object
* Present a view to present a new single resource object.
*
* @return mixed
* @return ResponseInterface
*/
public function new()
{
Expand All @@ -114,19 +122,19 @@ public function new()
* Process the creation/insertion of a new resource object.
* This should be a POST.
*
* @return mixed
* @return ResponseInterface
*/
public function create()
{
//
}

/**
* Present a view to edit the properties of a specific resource object
* Present a view to edit the properties of a specific resource object.
*
* @param mixed $id
* @param int|string|null $id
*
* @return mixed
* @return ResponseInterface
*/
public function edit($id = null)
{
Expand All @@ -137,33 +145,33 @@ public function edit($id = null)
* Process the updating, full or partial, of a specific resource object.
* This should be a POST.
*
* @param mixed $id
* @param int|string|null $id
*
* @return mixed
* @return ResponseInterface
*/
public function update($id = null)
{
//
}

/**
* Present a view to confirm the deletion of a specific resource object
* Present a view to confirm the deletion of a specific resource object.
*
* @param mixed $id
* @param int|string|null $id
*
* @return mixed
* @return ResponseInterface
*/
public function remove($id = null)
{
//
}

/**
* Process the deletion of a specific resource object
* Process the deletion of a specific resource object.
*
* @param mixed $id
* @param int|string|null $id
*
* @return mixed
* @return ResponseInterface
*/
public function delete($id = null)
{
Expand Down
Loading