Skip to content

Commit

Permalink
Fix CS errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad committed Mar 31, 2013
1 parent d681a19 commit d809b14
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 16 deletions.
2 changes: 1 addition & 1 deletion lib/Cake/Model/Behavior/TreeBehavior.php
Expand Up @@ -673,7 +673,7 @@ protected function _recoverByParentId(Model $Model, $counter = 1, $parentId = nu
$hasChildren = (bool)$children;

if (!is_null($parentId)) {
if($hasChildren) {
if ($hasChildren) {
$Model->updateAll(
array($this->settings[$Model->alias]['left'] => $counter),
array($Model->escapeField() => $parentId)
Expand Down
Expand Up @@ -139,7 +139,8 @@ public function testAuthenticateChallenge() {

try {
$this->auth->unauthenticated($request, $this->response);
} catch (UnauthorizedException $e) {}
} catch (UnauthorizedException $e) {
}

$this->assertNotEmpty($e);

Expand Down
Expand Up @@ -137,7 +137,8 @@ public function testAuthenticateChallenge() {

try {
$this->auth->unauthenticated($request, $this->response);
} catch (UnauthorizedException $e) {}
} catch (UnauthorizedException $e) {
}

$this->assertNotEmpty($e);

Expand Down
20 changes: 10 additions & 10 deletions lib/Cake/Test/Case/View/Helper/TextHelperTest.php
Expand Up @@ -345,24 +345,24 @@ public function testAutoParagraph() {
<p>This is a test text</p>
TEXT;
$result = $this->Text->autoParagraph($text);
$text = 'This is a <br/> <BR> test text';
$expected = <<<TEXT
$result = $this->Text->autoParagraph($text);
$text = 'This is a <br/> <BR> test text';
$expected = <<<TEXT
<p>This is a </p>
<p> test text</p>
TEXT;
$result = $this->Text->autoParagraph($text);
$this->assertEquals($expected, $result);
$result = $this->Text->autoParagraph($text);
$text = 'This is a <BR id="test"/><br class="test"> test text';
$expected = <<<TEXT
$result = $this->Text->autoParagraph($text);
$this->assertEquals($expected, $result);
$result = $this->Text->autoParagraph($text);
$text = 'This is a <BR id="test"/><br class="test"> test text';
$expected = <<<TEXT
<p>This is a </p>
<p> test text</p>
TEXT;
$result = $this->Text->autoParagraph($text);
$this->assertEquals($expected, $result);
$result = $this->Text->autoParagraph($text);
$this->assertEquals($expected, $result);
$text = <<<TEXT
This is a test text.
This is a line return.
Expand Down
3 changes: 1 addition & 2 deletions lib/Cake/Utility/Validation.php
Expand Up @@ -618,8 +618,7 @@ public static function phone($check, $regex = null, $country = 'all') {
switch ($country) {
case 'us':
case 'ca':
// deprecated three-letter-code
case 'can':
case 'can': // deprecated three-letter-code
case 'all':
// includes all NANPA members.
// see http://en.wikipedia.org/wiki/North_American_Numbering_Plan#List_of_NANPA_countries_and_territories
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/View/Helper/TextHelper.php
Expand Up @@ -250,7 +250,7 @@ public function autoParagraph($text) {
}
return $text;
}

/**
* @see String::stripLinks()
*
Expand Down

0 comments on commit d809b14

Please sign in to comment.