From dec404a5f081bd0c7cf9e6a2354eed481bb26065 Mon Sep 17 00:00:00 2001 From: mostwanted Date: Wed, 1 Jan 2014 21:18:39 +0100 Subject: [PATCH] Add @return void annotation to test methods (PoC) Missing @return void annotation in phpdoc block of test methods lead to php codesniffer (phpcs) errors when using the TYPO3 CMS coding guidelines: This function must always have a return value. (TYPO3SniffPool.Scope.AlwaysReturn.AlwaysReturnStatement) I suggest to add @return void annotations. Do you agree? --- Tests/Unit/Domain/Model/TeaTypeTest.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Tests/Unit/Domain/Model/TeaTypeTest.php b/Tests/Unit/Domain/Model/TeaTypeTest.php index 93c153e..a3610be 100644 --- a/Tests/Unit/Domain/Model/TeaTypeTest.php +++ b/Tests/Unit/Domain/Model/TeaTypeTest.php @@ -46,6 +46,7 @@ class TeaTypeTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase { /** * @test + * @return void */ public function getTitleInitiallyReturnsEmptyString() { $this->assertSame( @@ -56,6 +57,7 @@ class TeaTypeTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase { /** * @test + * @return void */ public function setTitleSetsTitle() { $this->subject->setTitle('foo bar'); @@ -68,6 +70,7 @@ class TeaTypeTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase { /** * @test + * @return void */ public function getCaffeinatedInitiallyReturnsFalse() { $this->assertSame( @@ -78,6 +81,7 @@ class TeaTypeTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase { /** * @test + * @return void */ public function setCaffeinatedSetsCaffeinated() { $this->subject->setCaffeinated(TRUE); @@ -86,4 +90,4 @@ class TeaTypeTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase { $this->subject->getCaffeinated() ); } -} \ No newline at end of file +}