Skip to content

Commit

Permalink
Remove ForbiddenAnonymousClassRule, as depends on context
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVotruba committed Aug 22, 2023
1 parent 4304774 commit e35486f
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 168 deletions.
1 change: 0 additions & 1 deletion config/static-rules.neon
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ rules:

- Symplify\PHPStanRules\Rules\Complexity\ForbiddenArrayMethodCallRule
- Symplify\PHPStanRules\Rules\ForbiddenSpreadOperatorRule
- Symplify\PHPStanRules\Rules\ForbiddenAnonymousClassRule
- Symplify\PHPStanRules\Rules\CheckRequiredInterfaceInContractNamespaceRule
- Symplify\PHPStanRules\Rules\NoEmptyClassRule

Expand Down
29 changes: 1 addition & 28 deletions docs/rules_overview.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 67 Rules Overview
# 66 Rules Overview

## AnnotateRegexClassConstWithRegexLinkRule

Expand Down Expand Up @@ -362,33 +362,6 @@ abstract class AbstractClass

<br>

## ForbiddenAnonymousClassRule

Anonymous class is not allowed.

- class: [`Symplify\PHPStanRules\Rules\ForbiddenAnonymousClassRule`](../src/Rules/ForbiddenAnonymousClassRule.php)

```php
new class {};
```

:x:

<br>

```php
class SomeClass
{

}

new SomeClass;
```

:+1:

<br>

## ForbiddenArrayMethodCallRule

Array method calls [$this, "method"] are not allowed. Use explicit method instead to help PhpStorm, PHPStan and Rector understand your code
Expand Down
66 changes: 0 additions & 66 deletions src/Rules/ForbiddenAnonymousClassRule.php

This file was deleted.

13 changes: 0 additions & 13 deletions tests/Rules/ForbiddenAnonymousClassRule/Fixture/AnonymousClass.php

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit e35486f

Please sign in to comment.