-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35 from Zenify/method-getter-docblock
FunctionComment sniff enabled [closes #30]
- Loading branch information
Showing
5 changed files
with
56 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
tests/Squiz/Commenting/FunctionComment/FunctionCommentSniffTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
namespace Zenify\CodingStandard\Tests\Squiz\Commenting\VariableComment; | ||
|
||
use PHPUnit_Framework_TestCase; | ||
use Zenify\CodingStandard\Tests\CodeSnifferRunner; | ||
|
||
|
||
/** | ||
* @covers Squiz_Sniffs_Commenting_FunctionCommentSniff | ||
*/ | ||
final class FunctionCommentSniffTest extends PHPUnit_Framework_TestCase | ||
{ | ||
|
||
public function testDetection() | ||
{ | ||
$codeSnifferRunner = new CodeSnifferRunner('Squiz.Commenting.FunctionComment'); | ||
|
||
$this->assertSame(1, $codeSnifferRunner->getErrorCountInFile(__DIR__ . '/wrong.php')); | ||
$this->assertSame(0, $codeSnifferRunner->getErrorCountInFile(__DIR__ . '/correct.php')); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
|
||
namespace SomeNamespace; | ||
|
||
|
||
class SomeClass | ||
{ | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getSome() | ||
{ | ||
return 'some'; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
namespace SomeNamespace; | ||
|
||
|
||
class SomeClass | ||
{ | ||
|
||
public function getSome() | ||
{ | ||
} | ||
|
||
} |