Skip to content
This repository
Browse code

Fix coding standards.

  • Loading branch information...
commit 771cfde19631b7cb147b9c9af06b064f0b15d635 1 parent eb33929
Mark Story authored September 03, 2012
2  lib/Cake/Test/Case/View/Helper/FormHelperTest.php
@@ -6125,7 +6125,7 @@ public function testPostLink() {
6125 6125
 			'/a'
6126 6126
 		));
6127 6127
 
6128  
-		$result = $this->Form->postLink('Delete', '/posts/delete/1', array('method'=>'delete'));
  6128
+		$result = $this->Form->postLink('Delete', '/posts/delete/1', array('method' => 'delete'));
6129 6129
 		$this->assertTags($result, array(
6130 6130
 			'form' => array(
6131 6131
 				'method' => 'post', 'action' => '/posts/delete/1',
2  lib/Cake/Test/Case/View/Helper/RssHelperTest.php
@@ -647,7 +647,7 @@ public function testItemEnclosureLength() {
647 647
 		} else {
648 648
 			$type = mime_content_type($tmpFile);
649 649
 		}
650  
-		
  650
+
651 651
 		$expected = array(
652 652
 			'<item',
653 653
 			'<title',
13  lib/Cake/View/Helper/FormHelper.php
@@ -1599,7 +1599,7 @@ public function postButton($title, $url, $options = array()) {
1599 1599
  * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/form.html#FormHelper::postLink
1600 1600
  */
1601 1601
 	public function postLink($title, $url = null, $options = array(), $confirmMessage = false) {
1602  
-    $requestMethod = 'POST';
  1602
+		$requestMethod = 'POST';
1603 1603
 		if (!empty($options['method'])) {
1604 1604
 			$requestMethod = strtoupper($options['method']);
1605 1605
 			unset($options['method']);
@@ -1611,8 +1611,15 @@ public function postLink($title, $url = null, $options = array(), $confirmMessag
1611 1611
 
1612 1612
 		$formName = uniqid('post_');
1613 1613
 		$formUrl = $this->url($url);
1614  
-		$out = $this->Html->useTag('form', $formUrl, array('name' => $formName, 'id' => $formName, 'style' => 'display:none;', 'method' => 'post'));
1615  
-		$out .= $this->Html->useTag('hidden', '_method', ' value="' . $requestMethod . '"');
  1614
+		$out = $this->Html->useTag('form', $formUrl, array(
  1615
+			'name' => $formName,
  1616
+			'id' => $formName,
  1617
+			'style' => 'display:none;',
  1618
+			'method' => 'post'
  1619
+		));
  1620
+		$out .= $this->Html->useTag('hidden', '_method', array(
  1621
+			'value' => $requestMethod
  1622
+		));
1616 1623
 		$out .= $this->_csrfField();
1617 1624
 
1618 1625
 		$fields = array();

0 notes on commit 771cfde

Please sign in to comment.
Something went wrong with that request. Please try again.