Skip to content
Browse files

Added space after functions and methods (#6)

  • Loading branch information...
1 parent 5de9ca3 commit 824c2fcc200a3969aa4868e78b79b7c46cbdc22c @jmalloc jmalloc committed Jan 14, 2013
Showing with 5 additions and 0 deletions.
  1. +2 −0 lib/Icecave/Rasta/Renderer.php
  2. +3 −0 test/suite/Icecave/Rasta/RendererTest.php
View
2 lib/Icecave/Rasta/Renderer.php
@@ -143,6 +143,7 @@ public function visitGlobalFunction(GlobalFunction $node)
}
$code = $this->indent('function ' . $node->name()->accept($this) . '(' . implode(', ', $parameters) . ')' . $this->newlineString);
$code .= $node->statementBlock()->accept($this);
+ $code .= $this->newlineString;
return $code;
}
@@ -443,6 +444,7 @@ public function visitConcreteMethod(ConcreteMethod $node)
$code = $this->indent(implode(' ', $modifiers) . ' function ' . $node->name()->accept($this) . '(' . implode(', ', $parameters) . ')' . $this->newlineString);
$code .= $node->statementBlock()->accept($this);
+ $code .= $this->newlineString;
return $code;
}
View
3 test/suite/Icecave/Rasta/RendererTest.php
@@ -91,6 +91,7 @@ public function testVisitGlobalFunction()
$expected = 'function func($param)' . $this->_newlineString;
$expected .= '{' . $this->_newlineString;
$expected .= '}' . $this->_newlineString;
+ $expected .= $this->_newlineString;
$this->assertSame($expected, $code);
}
@@ -609,6 +610,7 @@ public function testVisitConcreteMethod()
$expected = 'public function func($param)' . $this->_newlineString;
$expected .= '{' . $this->_newlineString;
$expected .= '}' . $this->_newlineString;
+ $expected .= $this->_newlineString;
$this->assertSame($expected, $code);
}
@@ -621,6 +623,7 @@ public function testVisitConcreteMethodStatic()
$expected = 'protected static function func($param)' . $this->_newlineString;
$expected .= '{' . $this->_newlineString;
$expected .= '}' . $this->_newlineString;
+ $expected .= $this->_newlineString;
$this->assertSame($expected, $code);
}

0 comments on commit 824c2fc

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