Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 22 additions & 56 deletions src/Lcobucci/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,63 +25,29 @@
<rule ref="SlevomatCodingStandard.TypeHints.TypeHintDeclaration">
<properties>
<property name="enableEachParameterAndReturnInspection" value="true"/>
<property name="allAnnotationsAreUseful" value="true"/>
<property name="traversableTypeHints" type="array" value="Doctrine\Common\Collections\Collection"/>
<property
name="usefulAnnotations"
type="array"
value="
@after,
@afterClass,
@AfterFeature,
@AfterMethods,
@AfterScenario,
@AfterStep,
@AfterSuite,
@Attribute,
@Attributes,
@before,
@beforeClass,
@BeforeFeature,
@BeforeMethods,
@BeforeScenario,
@BeforeStep,
@BeforeSuite,
@covers,
@coversDefaultClass,
@coversNothing,
@dataProvider,
@depends,
@deprecated,
@Enum,
@expectedDeprecation,
@expectedException,
@expectedExceptionCode,
@expectedExceptionMessage,
@expectedExceptionMessageRegExp,
@Given,
@group,
@Groups,
@IgnoreAnnotation,
@internal,
@Iterations,
@link,
@ODM\,
@ORM\,
@Required,
@Revs,
@runInSeparateProcess,
@runTestsInSeparalibteProcesses,
@see,
@Serializer\,
@Target,
@test,
@Then,
@throws,
@Transform,
@uses,
@When
"
/>
</properties>
</rule>

<rule ref="SlevomatCodingStandard.Commenting.DocCommentSpacing">
<properties>
<property name="linesCountBeforeFirstContent" value="0"/>
<property name="linesCountAfterLastContent" value="0"/>
<property name="linesCountBetweenDescriptionAndAnnotations" value="1"/>
<property name="linesCountBetweenAnnotationsGroups" value="1"/>
<property name="annotationsGroups" type="array">
<element value="@internal, @deprecated"/>
<element value="@link, @see"/>
<element value="@test, @group, @dataProvider, @depends, @doesNotPerformAssertions, @runInSeparateProcess"/>
<element value="@expectedDeprecation, @expectedException, @expectedExceptionCode, @expectedExceptionMessage, @expectedExceptionMessageRegExp"/>
<element value="@covers, @coversNothing"/>
<element value="@uses"/>
<element value="@ORM\,@ODM\"/>
<element value="@param"/>
<element value="@return"/>
<element value="@throws"/>
</property>
</properties>
</rule>
</ruleset>
68 changes: 42 additions & 26 deletions tests/ExampleClassWithNoViolation.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@

namespace Lcobucci;

/**
* @coversDefaultClass
* @runTestsInSeparateProcesses
*/
final class ExampleClassWithNoViolation
{
/**
Expand All @@ -11,6 +15,21 @@ final class ExampleClassWithNoViolation
private $test = 0;

/**
* @internal
* @deprecated
*
* @link
* @see Testing =)
* @Serializer\Type("string")
* @Target
* @Then
* @throws \Exception When things go very bad.
* @Transform
* @When
*
* @ORM\Entity
* @ODM\Entity
*
* @after
* @afterClass
* @AfterFeature
Expand All @@ -27,42 +46,39 @@ final class ExampleClassWithNoViolation
* @BeforeScenario
* @BeforeStep
* @BeforeSuite
* @covers
* @coversDefaultClass
* @coversNothing
* @dataProvider
* @depends
* @deprecated
* @Enum
* @expectedDeprecation
* @expectedException
* @expectedExceptionCode
* @expectedExceptionMessage
* @expectedExceptionMessageRegExp
* @Given
* @group
* @Groups
* @IgnoreAnnotation
* @internal
* @Iterations
* @link
* @ODM\Entity
* @ORM\Entity
* @Required
* @Revs
* @runInSeparateProcess
* @runTestsInSeparalibteProcesses
* @see Testing =)
* @Serializer\Type("string")
* @Target
*/
public function aMethodWithAllUsefulAnnotations(): void
{
echo $this->test;
}

/**
* @test
* @Then
* @throws \Exception When things go very bad.
* @Transform
* @group
* @dataProvider
* @depends
* @doesNotPerformAssertions
* @runInSeparateProcess
*
* @expectedDeprecation
* @expectedException
* @expectedExceptionCode
* @expectedExceptionMessage
* @expectedExceptionMessageRegExp
*
* @covers
* @coversNothing
*
* @uses
* @When
*/
public function aMethodWithAllUsefulAnnotations(): void
public function sampleForPHPUnitTests(): void
{
echo $this->test;
}
Expand Down