Browse Source

fix bake controller

avoid the `ERROR | Parameters must appear immediately after the comment` following phpcs --standard=CakePHP and for consistency with the framework
Anthony GRASSIOT 11 years ago
parent
commit
32c6966198

+ 3 - 3
src/Console/Templates/default/actions/controller_actions.ctp

@@ -51,9 +51,9 @@ $allAssociations = array_merge(
 /**
 /**
  * View method
  * View method
  *
  *
- * @throws NotFoundException
  * @param string $id
  * @param string $id
  * @return void
  * @return void
+ * @throws NotFoundException
  */
  */
 	public function view($id = null) {
 	public function view($id = null) {
 		$<?= $singularName?> = $this-><?= $currentModelName ?>->get($id, [
 		$<?= $singularName?> = $this-><?= $currentModelName ?>->get($id, [
@@ -94,9 +94,9 @@ $allAssociations = array_merge(
 /**
 /**
  * Edit method
  * Edit method
  *
  *
- * @throws NotFoundException
  * @param string $id
  * @param string $id
  * @return void
  * @return void
+ * @throws NotFoundException
  */
  */
 	public function edit($id = null) {
 	public function edit($id = null) {
 		$<?= $singularName ?> = $this-><?= $currentModelName ?>->get($id, [
 		$<?= $singularName ?> = $this-><?= $currentModelName ?>->get($id, [
@@ -126,9 +126,9 @@ $allAssociations = array_merge(
 /**
 /**
  * Delete method
  * Delete method
  *
  *
- * @throws NotFoundException
  * @param string $id
  * @param string $id
  * @return void
  * @return void
+ * @throws NotFoundException
  */
  */
 	public function delete($id = null) {
 	public function delete($id = null) {
 		$<?= $singularName ?> = $this-><?= $currentModelName ?>->get($id);
 		$<?= $singularName ?> = $this-><?= $currentModelName ?>->get($id);

+ 3 - 3
tests/bake_compare/Controller/Actions.ctp

@@ -14,9 +14,9 @@
 /**
 /**
  * View method
  * View method
  *
  *
- * @throws NotFoundException
  * @param string $id
  * @param string $id
  * @return void
  * @return void
+ * @throws NotFoundException
  */
  */
 	public function view($id = null) {
 	public function view($id = null) {
 		$bakeArticle = $this->BakeArticles->get($id, [
 		$bakeArticle = $this->BakeArticles->get($id, [
@@ -48,9 +48,9 @@
 /**
 /**
  * Edit method
  * Edit method
  *
  *
- * @throws NotFoundException
  * @param string $id
  * @param string $id
  * @return void
  * @return void
+ * @throws NotFoundException
  */
  */
 	public function edit($id = null) {
 	public function edit($id = null) {
 		$bakeArticle = $this->BakeArticles->get($id, [
 		$bakeArticle = $this->BakeArticles->get($id, [
@@ -73,9 +73,9 @@
 /**
 /**
  * Delete method
  * Delete method
  *
  *
- * @throws NotFoundException
  * @param string $id
  * @param string $id
  * @return void
  * @return void
+ * @throws NotFoundException
  */
  */
 	public function delete($id = null) {
 	public function delete($id = null) {
 		$bakeArticle = $this->BakeArticles->get($id);
 		$bakeArticle = $this->BakeArticles->get($id);