Skip to content

Commit

Permalink
Fix coding standards errors.
Browse files Browse the repository at this point in the history
Also remove count() calls in TreeBehavior.
  • Loading branch information
markstory committed Jun 1, 2012
1 parent 085ad0b commit 55c4ad3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions lib/Cake/Model/Behavior/TreeBehavior.php
Expand Up @@ -377,10 +377,12 @@ public function generateTreeList(Model $Model, $conditions = null, $keyPath = nu
$stack = array();

foreach ($results as $i => $result) {
while ($stack && ($stack[count($stack) - 1] < $result[$Model->alias][$right])) {
$count = count($stack);
while ($stack && ($stack[$count - 1] < $result[$Model->alias][$right])) {
array_pop($stack);
$count--;
}
$results[$i]['tree_prefix'] = str_repeat($spacer, count($stack));
$results[$i]['tree_prefix'] = str_repeat($spacer, $count);
$stack[] = $result[$Model->alias][$right];
}
if (empty($results)) {
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Test/Case/View/XmlViewTest.php
Expand Up @@ -119,7 +119,7 @@ public function testRenderWithView() {
$output = $View->render('index');

$expected = array(
'users'=> array('user'=> array('user1', 'user2'))
'users' => array('user' => array('user1', 'user2'))
);
$expected = Xml::build($expected)->asXML();
$this->assertSame($expected, $output);
Expand Down

0 comments on commit 55c4ad3

Please sign in to comment.