Browse Source

Reformat and use short array syntax.

Mark Story 12 years ago
parent
commit
c60f3fbf83
1 changed files with 6 additions and 7 deletions
  1. 6 7
      src/View/Helper/FormHelper.php

+ 6 - 7
src/View/Helper/FormHelper.php

@@ -1463,8 +1463,6 @@ class FormHelper extends Helper {
  *
  * ### Options
  *
- * - `div` - Include a wrapping div?  Defaults to true. Accepts sub options similar to
- *   FormHelper::input().
  * - `type` - Set to 'reset' for reset inputs. Defaults to 'submit'
  * - Other attributes will be assigned to the input element.
  *
@@ -1476,11 +1474,11 @@ class FormHelper extends Helper {
  * @return string A HTML submit button
  * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/form.html#FormHelper::submit
  */
-	public function submit($caption = null, $options = array()) {
+	public function submit($caption = null, $options = []) {
 		if (!is_string($caption) && empty($caption)) {
 			$caption = __d('cake', 'Submit');
 		}
-		$options += array('type' => 'submit', 'secure' => false);
+		$options += ['type' => 'submit', 'secure' => false];
 
 		if (isset($options['name'])) {
 			$this->_secure($options['secure'], $this->_secureFieldName($options));
@@ -1496,9 +1494,10 @@ class FormHelper extends Helper {
 		if ($isUrl || $isImage) {
 			$unlockFields = array('x', 'y');
 			if (isset($options['name'])) {
-				$unlockFields = array(
-					$options['name'] . '_x', $options['name'] . '_y'
-				);
+				$unlockFields = [
+					$options['name'] . '_x',
+					$options['name'] . '_y'
+				];
 			}
 			foreach ($unlockFields as $ignore) {
 				$this->unlockField($ignore);