Permalink
Browse files

baked controller code generates no errors

  • Loading branch information...
1 parent 8060dd5 commit 5b507636c79657043b63807dfa19b811fe7051ca @AD7six AD7six committed May 9, 2012
@@ -31,6 +31,7 @@
/**
* <?php echo $admin ?>view method
*
+ * @throws NotFoundException
* @param string $id
* @return void
*/
@@ -85,6 +86,7 @@
/**
* <?php echo $admin ?>edit method
*
+ * @throws NotFoundException
* @param string $id
* @return void
*/
@@ -129,6 +131,8 @@
/**
* <?php echo $admin ?>delete method
*
+ * @throws MethodNotAllowedException
+ * @throws NotFoundException
* @param string $id
* @return void
*/
@@ -154,4 +158,4 @@
$this->flash(__('<?php echo ucfirst(strtolower($singularHumanName)); ?> was not deleted'), array('action' => 'index'));
<?php endif; ?>
$this->redirect(array('action' => 'index'));
- }
+ }
@@ -46,36 +46,36 @@ class <?php echo $controllerName; ?>Controller extends <?php echo $plugin; ?>App
* @var mixed
*/
public $scaffold;
-<?php else: ?>
-<?php
-if (count($helpers)):
- echo "/**\n * Helpers\n *\n * @var array\n */\n";
- echo "\tpublic \$helpers = array(";
- for ($i = 0, $len = count($helpers); $i < $len; $i++):
- if ($i != $len - 1):
- echo "'" . Inflector::camelize($helpers[$i]) . "', ";
- else:
- echo "'" . Inflector::camelize($helpers[$i]) . "'";
- endif;
- endfor;
- echo ");\n";
-endif;
-if (count($components)):
- echo "/**\n * Components\n *\n * @var array\n */\n";
- echo "\tpublic \$components = array(";
- for ($i = 0, $len = count($components); $i < $len; $i++):
- if ($i != $len - 1):
- echo "'" . Inflector::camelize($components[$i]) . "', ";
- else:
- echo "'" . Inflector::camelize($components[$i]) . "'";
- endif;
- endfor;
- echo ");\n";
-endif;
+<?php else:
-echo $actions;
+ if (count($helpers)):
+ echo "/**\n * Helpers\n *\n * @var array\n */\n";
+ echo "\tpublic \$helpers = array(";
+ for ($i = 0, $len = count($helpers); $i < $len; $i++):
+ if ($i != $len - 1):
+ echo "'" . Inflector::camelize($helpers[$i]) . "', ";
+ else:
+ echo "'" . Inflector::camelize($helpers[$i]) . "'";
+ endif;
+ endfor;
+ echo ");\n\n";
+ endif;
-endif; ?>
+ if (count($components)):
+ echo "/**\n * Components\n *\n * @var array\n */\n";
+ echo "\tpublic \$components = array(";
+ for ($i = 0, $len = count($components); $i < $len; $i++):
+ if ($i != $len - 1):
+ echo "'" . Inflector::camelize($components[$i]) . "', ";
+ else:
+ echo "'" . Inflector::camelize($components[$i]) . "'";
+ endif;
+ endfor;
+ echo ");\n\n";
+ endif;
+ echo trim($actions) . "\n";
+
+endif; ?>
}

0 comments on commit 5b50763

Please sign in to comment.