Skip to content

Commit

Permalink
Remove NoDuplicatedShortClassNameRule as overly detailed (#133)
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVotruba authored Jun 2, 2024
1 parent 9f47728 commit 82ad4e3
Show file tree
Hide file tree
Showing 9 changed files with 1 addition and 355 deletions.
6 changes: 0 additions & 6 deletions config/configurable-rules.neon
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
services:
-
class: Symplify\PHPStanRules\Rules\NoDuplicatedShortClassNameRule
tags: [phpstan.rules.rule]
arguments:
toleratedNestingLevel: 2

-
class: Symplify\PHPStanRules\Rules\ForbiddenNodeRule
tags: [phpstan.rules.rule]
Expand Down
57 changes: 1 addition & 56 deletions docs/rules_overview.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 32 Rules Overview
# 31 Rules Overview

## AnnotateRegexClassConstWithRegexLinkRule

Expand Down Expand Up @@ -415,61 +415,6 @@ class SomeClass

<br>

## NoDuplicatedShortClassNameRule

Class with base "%s" name is already used in "%s". Use unique name to make classes easy to recognize

:wrench: **configure it!**

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

```yaml
services:
-
class: Symplify\PHPStanRules\Rules\NoDuplicatedShortClassNameRule
tags: [phpstan.rules.rule]
arguments:
toleratedNestingLevel: 1
```
```php
namespace App;

class SomeClass
{
}

namespace App\Nested;

class SomeClass
{
}
```

:x:

<br>

```php
namespace App;

class SomeClass
{
}

namespace App\Nested;

class AnotherClass
{
}
```

:+1:

<br>

## NoDynamicNameRule

Use explicit names over dynamic ones
Expand Down
173 changes: 0 additions & 173 deletions src/Rules/NoDuplicatedShortClassNameRule.php

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit 82ad4e3

Please sign in to comment.