Tons of coding standard fixes.

This commit is contained in:
Vasil Rangelov
2012-11-04 15:16:37 +02:00
parent 6b707f7166
commit 009237bad2
28 changed files with 251 additions and 144 deletions
@@ -1,9 +1,13 @@
<?php
/**
* phpDocumentor Covers Tag Test
*
* PHP version 5.3
*
* @author Daniel O'Connor <[email protected]>
* @copyright Copyright (c) 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
* @author Daniel O'Connor <[email protected]>
* @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
* @license http://www.opensource.org/licenses/mit-license.php MIT
* @link http://phpdoc.org
*/
namespace phpDocumentor\Reflection\DocBlock\Tag;
@@ -11,8 +15,10 @@ namespace phpDocumentor\Reflection\DocBlock\Tag;
/**
* Test class for phpDocumentor_Reflection_DocBlock_Tag_Covers
*
* @author Daniel O'Connor <[email protected]>
* @copyright Copyright (c) 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
* @author Daniel O'Connor <[email protected]>
* @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
* @license http://www.opensource.org/licenses/mit-license.php MIT
* @link http://phpdoc.org
*/
class CoversTagTest extends \PHPUnit_Framework_TestCase
{
@@ -33,8 +39,7 @@ class CoversTagTest extends \PHPUnit_Framework_TestCase
*/
public function testConstructorParesInputsIntoCorrectFields(
$type, $content, $exName, $exContent, $exDescription, $exReference
)
{
) {
$tag = new CoversTag($type, $content);
$actualName = $tag->getName();
@@ -1,9 +1,13 @@
<?php
/**
* phpDocumentor Link Tag Test
*
* PHP version 5.3
*
* @author Ben Selby <[email protected]>
* @copyright Copyright (c) 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
* @author Ben Selby <[email protected]>
* @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
* @license http://www.opensource.org/licenses/mit-license.php MIT
* @link http://phpdoc.org
*/
namespace phpDocumentor\Reflection\DocBlock\Tag;
@@ -11,8 +15,10 @@ namespace phpDocumentor\Reflection\DocBlock\Tag;
/**
* Test class for \phpDocumentor\Reflection\DocBlock\Tag\LinkTag
*
* @author Ben Selby <[email protected]>
* @copyright Copyright (c) 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
* @author Ben Selby <[email protected]>
* @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
* @license http://www.opensource.org/licenses/mit-license.php MIT
* @link http://phpdoc.org
*/
class LinkTagTest extends \PHPUnit_Framework_TestCase
{
@@ -34,8 +40,7 @@ class LinkTagTest extends \PHPUnit_Framework_TestCase
*/
public function testConstructorParesInputsIntoCorrectFields(
$type, $content, $exName, $exContent, $exDescription, $exLink
)
{
) {
$tag = new LinkTag($type, $content);
$actualName = $tag->getName();
@@ -1,9 +1,13 @@
<?php
/**
* phpDocumentor Method Tag Test
*
* PHP version 5.3
*
* @author Mike van Riel <[email protected]>
* @copyright Copyright (c) 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
* @author Mike van Riel <[email protected]>
* @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
* @license http://www.opensource.org/licenses/mit-license.php MIT
* @link http://phpdoc.org
*/
namespace phpDocumentor\Reflection\DocBlock\Tag;
@@ -11,14 +15,14 @@ namespace phpDocumentor\Reflection\DocBlock\Tag;
/**
* Test class for \phpDocumentor\Reflection\DocBlock\Tag\MethodTag
*
* @author Mike van Riel <[email protected]>
* @copyright Copyright (c) 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
* @author Mike van Riel <[email protected]>
* @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
* @license http://www.opensource.org/licenses/mit-license.php MIT
* @link http://phpdoc.org
*/
class MethodTagTest extends \PHPUnit_Framework_TestCase
{
/**
* @dataProvider getTestSignatures
*
* @param string $signature The signature to test
* @param bool $valid Whether the given signature is expected to
* be valid.
@@ -29,12 +33,14 @@ class MethodTagTest extends \PHPUnit_Framework_TestCase
* @param bool $has_params whether this signature features parameters.
* @param string $description The short description mentioned in the
* signature.
*
* @dataProvider getTestSignatures
*
* @return void
*/
public function testConstruct($signature, $valid, $expected_name,
$expected_return, $has_params, $description)
{
$expected_return, $has_params, $description
) {
ob_start();
$tag = new MethodTag('method', $signature);
$stdout = ob_get_clean();
@@ -44,7 +50,9 @@ class MethodTagTest extends \PHPUnit_Framework_TestCase
'No error should have been output if the signature is valid'
);
if (!$valid) return;
if (!$valid) {
return;
}
$this->assertEquals($expected_name, $tag->getMethodName());
$this->assertEquals($expected_return, $tag->getType());
@@ -1,9 +1,13 @@
<?php
/**
* phpDocumentor Param tag test.
*
* PHP version 5.3
*
* @author Mike van Riel <[email protected]>
* @copyright Copyright (c) 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
* @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
* @license http://www.opensource.org/licenses/mit-license.php MIT
* @link http://phpdoc.org
*/
namespace phpDocumentor\Reflection\DocBlock\Tag;
@@ -11,8 +15,10 @@ namespace phpDocumentor\Reflection\DocBlock\Tag;
/**
* Test class for phpDocumentor_Reflection_DocBlock_Param.
*
* @author Mike van Riel <[email protected]>
* @copyright Copyright (c) 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
* @author Mike van Riel <[email protected]>
* @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
* @license http://www.opensource.org/licenses/mit-license.php MIT
* @link http://phpdoc.org
*/
class ParamTagTest extends \PHPUnit_Framework_TestCase
{
@@ -1,9 +1,13 @@
<?php
/**
* phpDocumentor Return tag test.
*
* PHP version 5.3
*
* @author Mike van Riel <[email protected]>
* @copyright Copyright (c) 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
* @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
* @license http://www.opensource.org/licenses/mit-license.php MIT
* @link http://phpdoc.org
*/
namespace phpDocumentor\Reflection\DocBlock\Tag;
@@ -11,8 +15,10 @@ namespace phpDocumentor\Reflection\DocBlock\Tag;
/**
* Test class for phpDocumentor_Reflection_DocBlock_ReturnTag.
*
* @author Mike van Riel <[email protected]>
* @copyright Copyright (c) 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
* @author Mike van Riel <[email protected]>
* @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
* @license http://www.opensource.org/licenses/mit-license.php MIT
* @link http://phpdoc.org
*/
class ReturnTagTest extends ParamTagTest
{
@@ -1,9 +1,13 @@
<?php
/**
* phpDocumentor See Tag Test
*
* PHP version 5.3
*
* @author Daniel O'Connor <[email protected]>
* @copyright Copyright (c) 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
* @author Daniel O'Connor <[email protected]>
* @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
* @license http://www.opensource.org/licenses/mit-license.php MIT
* @link http://phpdoc.org
*/
namespace phpDocumentor\Reflection\DocBlock\Tag;
@@ -11,8 +15,10 @@ namespace phpDocumentor\Reflection\DocBlock\Tag;
/**
* Test class for phpDocumentor_Reflection_DocBlock_Tag_See
*
* @author Daniel O'Connor <[email protected]>
* @copyright Copyright (c) 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
* @author Daniel O'Connor <[email protected]>
* @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
* @license http://www.opensource.org/licenses/mit-license.php MIT
* @link http://phpdoc.org
*/
class SeeTagTest extends \PHPUnit_Framework_TestCase
{
@@ -33,8 +39,7 @@ class SeeTagTest extends \PHPUnit_Framework_TestCase
*/
public function testConstructorParesInputsIntoCorrectFields(
$type, $content, $exName, $exContent, $exDescription, $exReference
)
{
) {
$tag = new SeeTag($type, $content);
$actualName = $tag->getName();
@@ -1,9 +1,13 @@
<?php
/**
* phpDocumentor Uses Tag Test
*
* PHP version 5.3
*
* @author Daniel O'Connor <[email protected]>
* @copyright Copyright (c) 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
* @author Daniel O'Connor <[email protected]>
* @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
* @license http://www.opensource.org/licenses/mit-license.php MIT
* @link http://phpdoc.org
*/
namespace phpDocumentor\Reflection\DocBlock\Tag;
@@ -11,8 +15,10 @@ namespace phpDocumentor\Reflection\DocBlock\Tag;
/**
* Test class for phpDocumentor_Reflection_DocBlock_Tag_Uses
*
* @author Daniel O'Connor <[email protected]>
* @copyright Copyright (c) 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
* @author Daniel O'Connor <[email protected]>
* @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
* @license http://www.opensource.org/licenses/mit-license.php MIT
* @link http://phpdoc.org
*/
class UsesTagTest extends \PHPUnit_Framework_TestCase
{
@@ -33,8 +39,7 @@ class UsesTagTest extends \PHPUnit_Framework_TestCase
*/
public function testConstructorParesInputsIntoCorrectFields(
$type, $content, $exName, $exContent, $exDescription, $exReference
)
{
) {
$tag = new UsesTag($type, $content);
$actualName = $tag->getName();
@@ -1,9 +1,13 @@
<?php
/**
* phpDocumentor Var Tag Test
*
* PHP version 5.3
*
* @author Daniel O'Connor <[email protected]>
* @copyright Copyright (c) 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
* @author Daniel O'Connor <[email protected]>
* @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
* @license http://www.opensource.org/licenses/mit-license.php MIT
* @link http://phpdoc.org
*/
namespace phpDocumentor\Reflection\DocBlock\Tag;
@@ -11,8 +15,10 @@ namespace phpDocumentor\Reflection\DocBlock\Tag;
/**
* Test class for phpDocumentor_Reflection_DocBlock_Tag_Link
*
* @author Daniel O'Connor <[email protected]>
* @copyright Copyright (c) 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
* @author Daniel O'Connor <[email protected]>
* @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
* @license http://www.opensource.org/licenses/mit-license.php MIT
* @link http://phpdoc.org
*/
class VarTagTest extends \PHPUnit_Framework_TestCase
{
@@ -33,8 +39,7 @@ class VarTagTest extends \PHPUnit_Framework_TestCase
*/
public function testConstructorParesInputsIntoCorrectFields(
$type, $content, $exType, $exVariable, $exDescription
)
{
) {
$tag = new VarTag($type, $content);
$this->assertEquals($exType, $tag->getType());
@@ -1,9 +1,26 @@
<?php
/**
* phpDocumentor Covers Tag Test
*
* PHP version 5.3
*
* @author Mike van Riel <[email protected]>
* @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
* @license http://www.opensource.org/licenses/mit-license.php MIT
* @link http://phpdoc.org
*/
namespace phpDocumentor\Reflection\DocBlock\Type;
/**
* Test class for phpDocumentor_Reflection_DocBlock
*
* @covers phpDocumentor\Reflection\DocBlock\Type\Collection
*
* @author Mike van Riel <[email protected]>
* @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
* @license http://www.opensource.org/licenses/mit-license.php MIT
* @link http://phpdoc.org
*/
class CollectionTest extends \PHPUnit_Framework_TestCase
{
@@ -11,6 +28,8 @@ class CollectionTest extends \PHPUnit_Framework_TestCase
* @covers phpDocumentor\Reflection\DocBlock\Type\Collection::__construct
* @covers phpDocumentor\Reflection\DocBlock\Type\Collection::getNamespace
* @covers phpDocumentor\Reflection\DocBlock\Type\Collection::getNamespaceAliases
*
* @return void
*/
public function testConstruct()
{
@@ -22,6 +41,8 @@ class CollectionTest extends \PHPUnit_Framework_TestCase
/**
* @covers phpDocumentor\Reflection\DocBlock\Type\Collection::__construct
*
* @return void
*/
public function testConstructWithTypes()
{
@@ -32,6 +53,8 @@ class CollectionTest extends \PHPUnit_Framework_TestCase
/**
* @covers phpDocumentor\Reflection\DocBlock\Type\Collection::__construct
* @covers phpDocumentor\Reflection\DocBlock\Type\Collection::getNamespace
*
* @return void
*/
public function testConstructWithNamespace()
{
@@ -48,6 +71,8 @@ class CollectionTest extends \PHPUnit_Framework_TestCase
/**
* @covers phpDocumentor\Reflection\DocBlock\Type\Collection::__construct
* @covers phpDocumentor\Reflection\DocBlock\Type\Collection::getNamespaceAliases
*
* @return void
*/
public function testConstructWithNamespaceAliases()
{
@@ -59,6 +84,8 @@ class CollectionTest extends \PHPUnit_Framework_TestCase
/**
* @covers phpDocumentor\Reflection\DocBlock\Type\Collection::setNamespace
* @covers phpDocumentor\Reflection\DocBlock\Type\Collection::getNamespace
*
* @return void
*/
public function testSetAndGetNamespace()
{
@@ -78,6 +105,8 @@ class CollectionTest extends \PHPUnit_Framework_TestCase
/**
* @covers phpDocumentor\Reflection\DocBlock\Type\Collection::setNamespaceAliases
* @covers phpDocumentor\Reflection\DocBlock\Type\Collection::getNamespaceAliases
*
* @return void
*/
public function testSetAndGetNamespaceAliases()
{
@@ -94,6 +123,8 @@ class CollectionTest extends \PHPUnit_Framework_TestCase
*
* @dataProvider provideTypesToExpand
* @covers phpDocumentor\Reflection\DocBlock\Type\Collection::add
*
* @return void
*/
public function testAdd($fixture, $expected)
{
@@ -111,6 +142,8 @@ class CollectionTest extends \PHPUnit_Framework_TestCase
*
* @dataProvider provideTypesToExpandWithoutNamespace
* @covers phpDocumentor\Reflection\DocBlock\Type\Collection::add
*
* @return void
*/
public function testAddWithoutNamespace($fixture, $expected)
{
@@ -124,6 +157,8 @@ class CollectionTest extends \PHPUnit_Framework_TestCase
/**
* @covers phpDocumentor\Reflection\DocBlock\Type\Collection::add
* @expectedException InvalidArgumentException
*
* @return void
*/
public function testAddWithInvalidArgument()
{
@@ -135,7 +170,7 @@ class CollectionTest extends \PHPUnit_Framework_TestCase
* Returns the types and their expected values to test the retrieval of
* types.
*
* @param string $method Name of the method consuming this data provider.
* @param string $method Name of the method consuming this data provider.
* @param string $namespace Name of the namespace to user as basis.
*
* @return string[]
@@ -181,7 +216,6 @@ class CollectionTest extends \PHPUnit_Framework_TestCase
* types when no namespace is available.
*
* @param string $method Name of the method consuming this data provider.
* @param string $namespace Name of the namespace to user as basis.
*
* @return string[]
*/