Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove ForbiddenAnonymousClassRule, as depends on context #75

Merged
merged 1 commit into from
Aug 22, 2023
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: 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.