Skip to content

Commit

Permalink
Merge pull request #8561 from kenjis/fix-types-in-controller.tpl.php
Browse files Browse the repository at this point in the history
fix: PHPDoc types in controller.tpl.php
kenjis authored Feb 23, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
2 parents 65c6a61 + 4b8a38d commit 3c5a22e
Showing 1 changed file with 32 additions and 24 deletions.
56 changes: 32 additions & 24 deletions system/Commands/Generators/Views/controller.tpl.php
Original file line number Diff line number Diff line change
@@ -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
*/
@@ -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
*/
@@ -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
*/
@@ -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
*/
@@ -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
*/
@@ -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
*/
@@ -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
*/
@@ -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
*/
@@ -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
*/
@@ -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()
{
@@ -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)
{
@@ -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)
{

0 comments on commit 3c5a22e

Please sign in to comment.