Skip to content

Commit

Permalink
Indentation fix (tab instead of spaces)
Browse files Browse the repository at this point in the history
Fixes #2398

Conflicts:

	lib/Cake/Test/Case/Console/Command/ShellTest.php

Signed-off-by: mark_story <mark@mark-story.com>
  • Loading branch information
euromark authored and markstory committed Dec 21, 2011
1 parent 866177f commit a41539d
Show file tree
Hide file tree
Showing 17 changed files with 93 additions and 93 deletions.
4 changes: 2 additions & 2 deletions lib/Cake/Cache/Engine/FileEngine.php
Expand Up @@ -129,14 +129,14 @@ public function write($key, $data, $duration) {
$contents = $expires . $lineBreak . $data . $lineBreak;

if ($this->settings['lock']) {
$this->_File->flock(LOCK_EX);
$this->_File->flock(LOCK_EX);
}

$this->_File->rewind();
$success = $this->_File->ftruncate(0) && $this->_File->fwrite($contents) && $this->_File->fflush();

if ($this->settings['lock']) {
$this->_File->flock(LOCK_UN);
$this->_File->flock(LOCK_UN);
}

return $success;
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Cache/Engine/MemcacheEngine.php
Expand Up @@ -104,7 +104,7 @@ protected function _parseServerString($server) {
$position++;
}
} else {
$position = strpos($server, ':');
$position = strpos($server, ':');
}
$port = 11211;
$host = $server;
Expand Down
4 changes: 2 additions & 2 deletions lib/Cake/Model/Datasource/CakeSession.php
Expand Up @@ -158,10 +158,10 @@ protected static function _setPath($base = null) {
return;
}
if (strpos($base, 'index.php') !== false) {
$base = str_replace('index.php', '', $base);
$base = str_replace('index.php', '', $base);
}
if (strpos($base, '?') !== false) {
$base = str_replace('?', '', $base);
$base = str_replace('?', '', $base);
}
self::$path = $base;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Model/Model.php
Expand Up @@ -761,7 +761,7 @@ public function __isset($name) {
}
}
}
}
}

if (!$className) {
return false;
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Routing/Dispatcher.php
Expand Up @@ -313,7 +313,7 @@ protected function _deliverAsset(CakeResponse $response, $assetFile, $ext) {
$response->type($contentType);
}
if (!$compressionEnabled) {
$response->header('Content-Length', filesize($assetFile));
$response->header('Content-Length', filesize($assetFile));
}
$response->cache(filemtime($assetFile));
$response->send();
Expand Down
12 changes: 6 additions & 6 deletions lib/Cake/Test/Case/Cache/Engine/MemcacheEngineTest.php
Expand Up @@ -311,14 +311,14 @@ public function testIncrement() {
*/
public function testConfigurationConflict() {
Cache::config('long_memcache', array(
'engine' => 'Memcache',
'duration' => '+2 seconds',
'servers' => array('127.0.0.1:11211'),
'engine' => 'Memcache',
'duration' => '+2 seconds',
'servers' => array('127.0.0.1:11211'),
));
Cache::config('short_memcache', array(
'engine' => 'Memcache',
'duration' => '+1 seconds',
'servers' => array('127.0.0.1:11211'),
'engine' => 'Memcache',
'duration' => '+1 seconds',
'servers' => array('127.0.0.1:11211'),
));
Cache::config('some_file', array('engine' => 'File'));

Expand Down
Expand Up @@ -3614,7 +3614,7 @@ public function testLazyLoad() {
} catch (Exception $e) {
$exceptions = true;
}
$this->assertTrue(empty($exceptions));
$this->assertTrue(empty($exceptions));
}

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Test/Case/Model/ConnectionManagerTest.php
Expand Up @@ -277,7 +277,7 @@ public function testConnectionData() {
), App::RESET);
CakePlugin::loadAll();
$expected = array(
'datasource' => 'Test2Source'
'datasource' => 'Test2Source'
);

ConnectionManager::create('connection1', array('datasource' => 'Test2Source'));
Expand Down
14 changes: 7 additions & 7 deletions lib/Cake/Test/Case/Model/ModelDeleteTest.php
Expand Up @@ -767,7 +767,7 @@ public function testDeleteHabtmPostgresFailure() {
)), true);

// Article 1 should have Tag.1 and Tag.2
$before = $Article->find("all", array(
$before = $Article->find("all", array(
"conditions" => array("Article.id" => 1),
));
$this->assertEquals(count($before[0]['Tag']), 2, 'Tag count for Article.id = 1 is incorrect, should be 2 %s');
Expand All @@ -781,17 +781,17 @@ public function testDeleteHabtmPostgresFailure() {
);
$Tag->save($submitted_data);

// One more submission (The other way around) to make sure the reverse save looks good.
$submitted_data = array(
// One more submission (The other way around) to make sure the reverse save looks good.
$submitted_data = array(
"Article" => array("id" => 2, 'title' => 'second article'),
"Tag" => array(
"Tag" => array(2, 3)
)
);
// ERROR:
// Postgresql: DELETE FROM "articles_tags" WHERE tag_id IN ('1', '3')
// MySQL: DELETE `ArticlesTag` FROM `articles_tags` AS `ArticlesTag` WHERE `ArticlesTag`.`article_id` = 2 AND `ArticlesTag`.`tag_id` IN (1, 3)
$Article->save($submitted_data);
// ERROR:
// Postgresql: DELETE FROM "articles_tags" WHERE tag_id IN ('1', '3')
// MySQL: DELETE `ArticlesTag` FROM `articles_tags` AS `ArticlesTag` WHERE `ArticlesTag`.`article_id` = 2 AND `ArticlesTag`.`tag_id` IN (1, 3)
$Article->save($submitted_data);

// Want to make sure Article #1 has Tag #1 and Tag #2 still.
$after = $Article->find("all", array(
Expand Down
6 changes: 3 additions & 3 deletions lib/Cake/Test/Case/Model/ModelReadTest.php
Expand Up @@ -303,7 +303,7 @@ public function testPreparedQuery() {
$result = $Article->query($query, $params, false);
$this->assertTrue(is_array($result));
$this->assertTrue(
isset($result[0][$this->db->fullTableName('articles', false)])
isset($result[0][$this->db->fullTableName('articles', false)])
|| isset($result[0][0])
);
$result = $this->db->getQueryCache($query, $params);
Expand All @@ -317,7 +317,7 @@ public function testPreparedQuery() {
$result = $Article->query($query, $params);
$this->assertTrue(is_array($result));
$this->assertTrue(
isset($result[0][$this->db->fullTableName('articles', false)]['title'])
isset($result[0][$this->db->fullTableName('articles', false)]['title'])
|| isset($result[0][0]['title'])
);

Expand Down Expand Up @@ -7651,7 +7651,7 @@ public function testVirtualFieldAsAString() {
$this->loadFixtures('Post', 'Author');
$Post = new Post();
$Post->virtualFields = array(
'writer' => 'Author.user'
'writer' => 'Author.user'
);
$result = $Post->find('first');
$this->assertTrue(isset($result['Post']['writer']), 'virtual field not fetched %s');
Expand Down
10 changes: 5 additions & 5 deletions lib/Cake/Test/Case/Network/Email/CakeEmailTest.php
Expand Up @@ -301,11 +301,11 @@ public function testFormatAddressJapanese() {

$result = $this->CakeEmail->formatAddress(array('cake@cakephp.org' => '寿限無寿限無五劫の擦り切れ海砂利水魚の水行末雲来末風来末食う寝る処に住む処やぶら小路の藪柑子パイポパイポパイポのシューリンガンシューリンガンのグーリンダイグーリンダイのポンポコピーのポンポコナーの長久命の長助'));
$expected = array("=?ISO-2022-JP?B?GyRCPHc4Qkw1PHc4Qkw1OF45ZSROOyQkakBaJGwzJDo9TXg/ZTV7GyhC?=\r\n"
." =?ISO-2022-JP?B?GyRCJE4/ZTlUS3YxQE1oS3ZJd01oS3Y/KSQmPzIkaz1oJEs9OyRgGyhC?=\r\n"
." =?ISO-2022-JP?B?GyRCPWgkZCRWJGk+Lk8pJE5pLjQ7O1IlUSUkJV0lUSUkJV0lUSUkGyhC?=\r\n"
." =?ISO-2022-JP?B?GyRCJV0kTiU3JWUhPCVqJXMlLCVzJTclZSE8JWolcyUsJXMkTiUwGyhC?=\r\n"
." =?ISO-2022-JP?B?GyRCITwlaiVzJUAlJCUwITwlaiVzJUAlJCROJV0lcyVdJTMlVCE8GyhC?=\r\n"
." =?ISO-2022-JP?B?GyRCJE4lXSVzJV0lMyVKITwkTkQ5NVdMPyRORDk9dRsoQg==?= <cake@cakephp.org>");
." =?ISO-2022-JP?B?GyRCJE4/ZTlUS3YxQE1oS3ZJd01oS3Y/KSQmPzIkaz1oJEs9OyRgGyhC?=\r\n"
." =?ISO-2022-JP?B?GyRCPWgkZCRWJGk+Lk8pJE5pLjQ7O1IlUSUkJV0lUSUkJV0lUSUkGyhC?=\r\n"
." =?ISO-2022-JP?B?GyRCJV0kTiU3JWUhPCVqJXMlLCVzJTclZSE8JWolcyUsJXMkTiUwGyhC?=\r\n"
." =?ISO-2022-JP?B?GyRCITwlaiVzJUAlJCUwITwlaiVzJUAlJCROJV0lcyVdJTMlVCE8GyhC?=\r\n"
." =?ISO-2022-JP?B?GyRCJE4lXSVzJV0lMyVKITwkTkQ5NVdMPyRORDk9dRsoQg==?= <cake@cakephp.org>");
$this->assertSame($expected, $result);
}

Expand Down
12 changes: 6 additions & 6 deletions lib/Cake/Test/Case/Utility/DebuggerTest.php
Expand Up @@ -140,8 +140,8 @@ public function testOutput() {
'a' => array(
'href' => "javascript:void(0);",
'onclick' => "preg:/document\.getElementById\('cakeErr[a-z0-9]+\-trace'\)\.style\.display = " .
"\(document\.getElementById\('cakeErr[a-z0-9]+\-trace'\)\.style\.display == 'none'" .
" \? '' \: 'none'\);/"
"\(document\.getElementById\('cakeErr[a-z0-9]+\-trace'\)\.style\.display == 'none'" .
" \? '' \: 'none'\);/"
),
'b' => array(), 'Notice', '/b', ' (8)',
));
Expand All @@ -162,14 +162,14 @@ public function testChangeOutputFormats() {

Debugger::output('js', array(
'traceLine' => '{:reference} - <a href="txmt://open?url=file://{:file}' .
'&line={:line}">{:path}</a>, line {:line}'
'&line={:line}">{:path}</a>, line {:line}'
));
$result = Debugger::trace();
$this->assertRegExp('/' . preg_quote('txmt://open?url=file://', '/') . '(\/|[A-Z]:\\\\)' . '/', $result);

Debugger::output('xml', array(
'error' => '<error><code>{:code}</code><file>{:file}</file><line>{:line}</line>' .
'{:description}</error>',
'{:description}</error>',
'context' => "<context>{:context}</context>",
'trace' => "<stack>{:trace}</stack>",
));
Expand Down Expand Up @@ -221,7 +221,7 @@ public function testAddFormat() {

Debugger::addFormat('js', array(
'traceLine' => '{:reference} - <a href="txmt://open?url=file://{:file}' .
'&line={:line}">{:path}</a>, line {:line}'
'&line={:line}">{:path}</a>, line {:line}'
));
Debugger::outputAs('js');

Expand All @@ -230,7 +230,7 @@ public function testAddFormat() {

Debugger::addFormat('xml', array(
'error' => '<error><code>{:code}</code><file>{:file}</file><line>{:line}</line>' .
'{:description}</error>',
'{:description}</error>',
));
Debugger::outputAs('xml');

Expand Down
4 changes: 2 additions & 2 deletions lib/Cake/Test/Case/Utility/InflectorTest.php
Expand Up @@ -230,7 +230,7 @@ public function testInflectorSlug() {
* @return void
*/
public function testInflectorSlugWithMap() {
Inflector::rules('transliteration', array('/r/' => '1'));
Inflector::rules('transliteration', array('/r/' => '1'));
$result = Inflector::slug('replace every r');
$expected = '1eplace_eve1y_1';
$this->assertEquals($expected, $result);
Expand All @@ -246,7 +246,7 @@ public function testInflectorSlugWithMap() {
* @return void
*/
public function testInflectorSlugWithMapOverridingDefault() {
Inflector::rules('transliteration', array('/å/' => 'aa', '/ø/' => 'oe'));
Inflector::rules('transliteration', array('/å/' => 'aa', '/ø/' => 'oe'));
$result = Inflector::slug('Testing æ ø å', '-');
$expected = 'Testing-ae-oe-aa';
$this->assertEquals($expected, $result);
Expand Down
84 changes: 42 additions & 42 deletions lib/Cake/Test/Case/Utility/SetTest.php
Expand Up @@ -2815,26 +2815,26 @@ public function testXmlSetReverse() {

$string = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<rss version="2.0">
<channel>
<title>Cake PHP Google Group</title>
<link>http://groups.google.com/group/cake-php</link>
<description>Search this group before posting anything. There are over 20,000 posts and it&amp;#39;s very likely your question was answered before. Visit the IRC channel #cakephp at irc.freenode.net for live chat with users and developers of Cake. If you post, tell us the version of Cake, PHP, and database.</description>
<language>en</language>
<item>
<title>constructng result array when using findall</title>
<link>http://groups.google.com/group/cake-php/msg/49bc00f3bc651b4f</link>
<description>i&#39;m using cakephp to construct a logical data model array that will be &lt;br&gt; passed to a flex app. I have the following model association: &lt;br&gt; ServiceDay-&amp;gt;(hasMany)ServiceTi me-&amp;gt;(hasMany)ServiceTimePrice. So what &lt;br&gt; the current output from my findall is something like this example: &lt;br&gt; &lt;p&gt;Array( &lt;br&gt; [0] =&amp;gt; Array(</description>
<guid isPermaLink="true">http://groups.google.com/group/cake-php/msg/49bc00f3bc651b4f</guid>
<author>bmil...@gmail.com(bpscrugs)</author>
<pubDate>Fri, 28 Dec 2007 00:44:14 UT</pubDate>
</item>
<item>
<title>Re: share views between actions?</title>
<link>http://groups.google.com/group/cake-php/msg/8b350d898707dad8</link>
<description>Then perhaps you might do us all a favour and refrain from replying to &lt;br&gt; things you do not understand. That goes especially for asinine comments. &lt;br&gt; Indeed. &lt;br&gt; To sum up: &lt;br&gt; No comment. &lt;br&gt; In my day, a simple &amp;quot;RTFM&amp;quot; would suffice. I&#39;ll keep in mind to ignore any &lt;br&gt; further responses from you. &lt;br&gt; You (and I) were referring to the *online documentation*, not other</description>
<guid isPermaLink="true">http://groups.google.com/group/cake-php/msg/8b350d898707dad8</guid>
<author>subtropolis.z...@gmail.com(subtropolis zijn)</author>
<pubDate>Fri, 28 Dec 2007 00:45:01 UT</pubDate>
<channel>
<title>Cake PHP Google Group</title>
<link>http://groups.google.com/group/cake-php</link>
<description>Search this group before posting anything. There are over 20,000 posts and it&amp;#39;s very likely your question was answered before. Visit the IRC channel #cakephp at irc.freenode.net for live chat with users and developers of Cake. If you post, tell us the version of Cake, PHP, and database.</description>
<language>en</language>
<item>
<title>constructng result array when using findall</title>
<link>http://groups.google.com/group/cake-php/msg/49bc00f3bc651b4f</link>
<description>i&#39;m using cakephp to construct a logical data model array that will be &lt;br&gt; passed to a flex app. I have the following model association: &lt;br&gt; ServiceDay-&amp;gt;(hasMany)ServiceTi me-&amp;gt;(hasMany)ServiceTimePrice. So what &lt;br&gt; the current output from my findall is something like this example: &lt;br&gt; &lt;p&gt;Array( &lt;br&gt; [0] =&amp;gt; Array(</description>
<guid isPermaLink="true">http://groups.google.com/group/cake-php/msg/49bc00f3bc651b4f</guid>
<author>bmil...@gmail.com(bpscrugs)</author>
<pubDate>Fri, 28 Dec 2007 00:44:14 UT</pubDate>
</item>
<item>
<title>Re: share views between actions?</title>
<link>http://groups.google.com/group/cake-php/msg/8b350d898707dad8</link>
<description>Then perhaps you might do us all a favour and refrain from replying to &lt;br&gt; things you do not understand. That goes especially for asinine comments. &lt;br&gt; Indeed. &lt;br&gt; To sum up: &lt;br&gt; No comment. &lt;br&gt; In my day, a simple &amp;quot;RTFM&amp;quot; would suffice. I&#39;ll keep in mind to ignore any &lt;br&gt; further responses from you. &lt;br&gt; You (and I) were referring to the *online documentation*, not other</description>
<guid isPermaLink="true">http://groups.google.com/group/cake-php/msg/8b350d898707dad8</guid>
<author>subtropolis.z...@gmail.com(subtropolis zijn)</author>
<pubDate>Fri, 28 Dec 2007 00:45:01 UT</pubDate>
</item>
</channel>
</rss>';
Expand Down Expand Up @@ -2917,32 +2917,32 @@ public function testXmlSetReverse() {

$string = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<rss version="2.0" xmlns:dc="http://www.cakephp.org/">
<channel>
<title>Cake PHP Google Group</title>
<link>http://groups.google.com/group/cake-php</link>
<description>Search this group before posting anything. There are over 20,000 posts and it&amp;#39;s very likely your question was answered before. Visit the IRC channel #cakephp at irc.freenode.net for live chat with users and developers of Cake. If you post, tell us the version of Cake, PHP, and database.</description>
<language>en</language>
<item>
<title>constructng result array when using findall</title>
<link>http://groups.google.com/group/cake-php/msg/49bc00f3bc651b4f</link>
<description>i&#39;m using cakephp to construct a logical data model array that will be &lt;br&gt; passed to a flex app. I have the following model association: &lt;br&gt; ServiceDay-&amp;gt;(hasMany)ServiceTi me-&amp;gt;(hasMany)ServiceTimePrice. So what &lt;br&gt; the current output from my findall is something like this example: &lt;br&gt; &lt;p&gt;Array( &lt;br&gt; [0] =&amp;gt; Array(</description>
<dc:creator>cakephp</dc:creator>
<channel>
<title>Cake PHP Google Group</title>
<link>http://groups.google.com/group/cake-php</link>
<description>Search this group before posting anything. There are over 20,000 posts and it&amp;#39;s very likely your question was answered before. Visit the IRC channel #cakephp at irc.freenode.net for live chat with users and developers of Cake. If you post, tell us the version of Cake, PHP, and database.</description>
<language>en</language>
<item>
<title>constructng result array when using findall</title>
<link>http://groups.google.com/group/cake-php/msg/49bc00f3bc651b4f</link>
<description>i&#39;m using cakephp to construct a logical data model array that will be &lt;br&gt; passed to a flex app. I have the following model association: &lt;br&gt; ServiceDay-&amp;gt;(hasMany)ServiceTi me-&amp;gt;(hasMany)ServiceTimePrice. So what &lt;br&gt; the current output from my findall is something like this example: &lt;br&gt; &lt;p&gt;Array( &lt;br&gt; [0] =&amp;gt; Array(</description>
<dc:creator>cakephp</dc:creator>
<category><![CDATA[cakephp]]></category>
<category><![CDATA[model]]></category>
<guid isPermaLink="true">http://groups.google.com/group/cake-php/msg/49bc00f3bc651b4f</guid>
<author>bmil...@gmail.com(bpscrugs)</author>
<pubDate>Fri, 28 Dec 2007 00:44:14 UT</pubDate>
</item>
<item>
<title>Re: share views between actions?</title>
<link>http://groups.google.com/group/cake-php/msg/8b350d898707dad8</link>
<description>Then perhaps you might do us all a favour and refrain from replying to &lt;br&gt; things you do not understand. That goes especially for asinine comments. &lt;br&gt; Indeed. &lt;br&gt; To sum up: &lt;br&gt; No comment. &lt;br&gt; In my day, a simple &amp;quot;RTFM&amp;quot; would suffice. I&#39;ll keep in mind to ignore any &lt;br&gt; further responses from you. &lt;br&gt; You (and I) were referring to the *online documentation*, not other</description>
<dc:creator>cakephp</dc:creator>
<guid isPermaLink="true">http://groups.google.com/group/cake-php/msg/49bc00f3bc651b4f</guid>
<author>bmil...@gmail.com(bpscrugs)</author>
<pubDate>Fri, 28 Dec 2007 00:44:14 UT</pubDate>
</item>
<item>
<title>Re: share views between actions?</title>
<link>http://groups.google.com/group/cake-php/msg/8b350d898707dad8</link>
<description>Then perhaps you might do us all a favour and refrain from replying to &lt;br&gt; things you do not understand. That goes especially for asinine comments. &lt;br&gt; Indeed. &lt;br&gt; To sum up: &lt;br&gt; No comment. &lt;br&gt; In my day, a simple &amp;quot;RTFM&amp;quot; would suffice. I&#39;ll keep in mind to ignore any &lt;br&gt; further responses from you. &lt;br&gt; You (and I) were referring to the *online documentation*, not other</description>
<dc:creator>cakephp</dc:creator>
<category><![CDATA[cakephp]]></category>
<category><![CDATA[model]]></category>
<guid isPermaLink="true">http://groups.google.com/group/cake-php/msg/8b350d898707dad8</guid>
<author>subtropolis.z...@gmail.com(subtropolis zijn)</author>
<pubDate>Fri, 28 Dec 2007 00:45:01 UT</pubDate>
<guid isPermaLink="true">http://groups.google.com/group/cake-php/msg/8b350d898707dad8</guid>
<author>subtropolis.z...@gmail.com(subtropolis zijn)</author>
<pubDate>Fri, 28 Dec 2007 00:45:01 UT</pubDate>
</item>
</channel>
</rss>';
Expand Down
4 changes: 2 additions & 2 deletions lib/Cake/Test/Case/View/Helper/JsHelperTest.php
Expand Up @@ -839,10 +839,10 @@ public function testObject() {
),
'2006' => array(
'Spring' => array(
'1' => array('id' => 1, 'name' => 'Josh'), '2' => array('id' => 2, 'name' => 'Becky')
'1' => array('id' => 1, 'name' => 'Josh'), '2' => array('id' => 2, 'name' => 'Becky')
),
'Fall' => array(
'1' => array('id' => 1, 'name' => 'Josh'), '2' => array('id' => 2, 'name' => 'Becky')
'1' => array('id' => 1, 'name' => 'Josh'), '2' => array('id' => 2, 'name' => 'Becky')
)
)
));
Expand Down
4 changes: 2 additions & 2 deletions lib/Cake/TestSuite/CakeTestSuiteCommand.php
Expand Up @@ -39,9 +39,9 @@ class CakeTestSuiteCommand extends PHPUnit_TextUI_Command {
* @param array $params list of options to be used for this run
*/
public function __construct($loader, $params = array()) {
if ($loader && !class_exists($loader)) {
if ($loader && !class_exists($loader)) {
throw new MissingTestLoaderException(array('class' => $loader));
}
}
$this->arguments['loader'] = $loader;
$this->arguments['test'] = $params['case'];
$this->arguments['testFile'] = $params;
Expand Down

0 comments on commit a41539d

Please sign in to comment.