Skip to content

Commit

Permalink
[zendframework#5245] CS fixes
Browse files Browse the repository at this point in the history
- trailing whitespace, braces
- Added functions.php to the exclude list for php-cs-fixer, as the tests are
  testing specific formatting issues.
  • Loading branch information
weierophinney committed Oct 30, 2013
1 parent c9a0741 commit 76074d4
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
1 change: 1 addition & 0 deletions tests/.php_cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php
$finder = Symfony\CS\Finder\DefaultFinder::create()
->notName('TestSampleClass10.php')
->notName('functions.php')
->in(__DIR__);
return Symfony\CS\Config\Config::create()
->finder($finder);
2 changes: 1 addition & 1 deletion tests/ZendTest/Code/Reflection/FunctionReflectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ public function testFunctionClosureContentsReturnWithoutDocBlock()
$function = new FunctionReflection($function9);
$content = $function->getContents(false);
$this->assertEquals("function() {}", trim($content));

$function = new FunctionReflection($function10);
$content = $function->getContents(false);
$this->assertEquals("function() { return 'function10'; }", trim($content));
Expand Down
4 changes: 2 additions & 2 deletions tests/ZendTest/Code/Reflection/MethodReflectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public function testGetBodyReturnsCorrectBody()
$reflectionMethod = new MethodReflection('ZendTest\Code\Reflection\TestAsset\TestSampleClass11', 'emptyFunction');
$body = $reflectionMethod->getBody();
$this->assertEquals(trim($body), "");

$reflectionMethod = new MethodReflection('ZendTest\Code\Reflection\TestAsset\TestSampleClass11', 'visibility');
$body = $reflectionMethod->getBody();
$this->assertEquals(trim($body), "return 'visibility';");
Expand Down Expand Up @@ -141,7 +141,7 @@ public function doSomethingAgain()
$contents = ' public function inline3() { return \'inline3\'; }';
$reflectionMethod = new MethodReflection('ZendTest\Code\Reflection\TestAsset\TestSampleClass11', 'inline3');
$this->assertEquals($contents, $reflectionMethod->getContents(false));

$contents = <<<'CONTENTS'
public function visibility()
{
Expand Down
6 changes: 2 additions & 4 deletions tests/ZendTest/Code/Reflection/TestAsset/closures.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
* The class Zend\Code\Reflection\FunctionReflection must parse a lot of closure formats
*/

$function1 = function()
{
$function1 = function() {
return 'function1';
};

Expand All @@ -25,8 +24,7 @@
return 'function3';
};

$function4 = function()
{
$function4 = function() {
$closure = function() { return 'bar'; };
return 'function4';
};
Expand Down

0 comments on commit 76074d4

Please sign in to comment.