Skip to content
Browse files

Fix a few small code standards issues.

  • Loading branch information...
1 parent b3d886f commit c1531d3faa71b6e08c81a884a49f23a55a20e774 @markstory markstory committed
Showing with 9 additions and 9 deletions.
  1. +5 −5 lib/Cake/Test/Case/Cache/Engine/FileEngineTest.php
  2. +4 −4 lib/Cake/View/Helper/TextHelper.php
View
10 lib/Cake/Test/Case/Cache/Engine/FileEngineTest.php
@@ -107,11 +107,11 @@ public function testConsecutiveReadWrite() {
$result = Cache::read('rw', 'file_test');
Cache::write('rw', 'second write', 'file_test');
- $result2 = Cache::read('rw', 'file_test');
+ $resultB = Cache::read('rw', 'file_test');
Cache::delete('rw', 'file_test');
$this->assertEquals('first write', $result);
- $this->assertEquals('second write', $result2);
+ $this->assertEquals('second write', $resultB);
}
/**
@@ -239,9 +239,9 @@ public function testClearWithPrefixes() {
'duration' => DAY
));
- $data1 = $data2 = $expected = 'content to cache';
- $FileOne->write('prefix_one_key_one', $data1, DAY);
- $FileTwo->write('prefix_two_key_two', $data2, DAY);
+ $dataOne = $dataTwo = $expected = 'content to cache';
+ $FileOne->write('prefix_one_key_one', $dataOne, DAY);
+ $FileTwo->write('prefix_two_key_two', $dataTwo, DAY);
$this->assertEquals($expected, $FileOne->read('prefix_one_key_one'));
$this->assertEquals($expected, $FileTwo->read('prefix_two_key_two'));
View
8 lib/Cake/View/Helper/TextHelper.php
@@ -139,12 +139,12 @@ protected function _insertPlaceHolder($matches) {
*/
protected function _linkUrls($text, $htmlOptions) {
$replace = array();
- foreach ($this->_placeholders as $md5 => $url) {
+ foreach ($this->_placeholders as $hash => $url) {
$link = $url;
if (!preg_match('#^[a-z]+\://#', $url)) {
$url = 'http://' . $url;
}
- $replace[$md5] = $this->Html->link($link, $url, $htmlOptions);
+ $replace[$hash] = $this->Html->link($link, $url, $htmlOptions);
}
return strtr($text, $replace);
}
@@ -159,8 +159,8 @@ protected function _linkUrls($text, $htmlOptions) {
*/
protected function _linkEmails($text, $options) {
$replace = array();
- foreach ($this->_placeholders as $md5 => $url) {
- $replace[$md5] = $this->Html->link($url, 'mailto:' . $url, $options);
+ foreach ($this->_placeholders as $hash => $url) {
+ $replace[$hash] = $this->Html->link($url, 'mailto:' . $url, $options);
}
return strtr($text, $replace);
}

0 comments on commit c1531d3

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