From c60f3fbf836c8f8ac36f4d6fbc276224c59eed13 Mon Sep 17 00:00:00 2001 From: Mark Story Date: Mon, 3 Mar 2014 21:24:47 -0500 Subject: [PATCH] Reformat and use short array syntax. --- src/View/Helper/FormHelper.php | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/View/Helper/FormHelper.php b/src/View/Helper/FormHelper.php index 31b8ac0a8b1..0bc92cbb401 100755 --- a/src/View/Helper/FormHelper.php +++ b/src/View/Helper/FormHelper.php @@ -1463,8 +1463,6 @@ public function postLink($title, $url = null, $options = array(), $confirmMessag * * ### 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 @@ public function postLink($title, $url = null, $options = array(), $confirmMessag * @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 @@ public function submit($caption = null, $options = array()) { 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);