Skip to content
This repository was archived by the owner on Nov 21, 2019. It is now read-only.
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
1 change: 1 addition & 0 deletions src/Libero/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<rule ref="Generic.CodeAnalysis.EmptyStatement">
<exclude name="Generic.CodeAnalysis.EmptyStatement.DetectedCatch"/>
</rule>
<rule ref="Generic.CodeAnalysis.UnnecessaryFinalModifier"/>
<rule ref="Generic.Commenting.Fixme"/>
<rule ref="Generic.Commenting.Todo"/>
<rule ref="Generic.Files.InlineHTML"/>
Expand Down
21 changes: 21 additions & 0 deletions tests/cases/classes/method-final-useless
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---DESCRIPTION---
Final methods must not be used in final classes
---FILENAME---
Foo.php
---CONTENTS---
<?php

declare(strict_types=1);

namespace Vendor;

final class Foo
{
final public function bar() : void
{
}
}

---MESSAGES---
9:5 Generic.CodeAnalysis.UnnecessaryFinalModifier.Found
---