Skip to content

Commit

Permalink
Remove NoShortNameRule, as devs are educated and not a thing anymore (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVotruba authored May 26, 2024
1 parent af09e51 commit 9213f3c
Show file tree
Hide file tree
Showing 11 changed files with 1 addition and 326 deletions.
6 changes: 0 additions & 6 deletions config/configurable-rules.neon
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@ services:
arguments:
toleratedNestingLevel: 2

-
class: Symplify\PHPStanRules\ObjectCalisthenics\Rules\NoShortNameRule
tags: [phpstan.rules.rule]
arguments:
minNameLength: 2

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

## AnnotateRegexClassConstWithRegexLinkRule

Expand Down Expand Up @@ -994,45 +994,6 @@ final class SomeClass

<br>

## NoShortNameRule

Do not name "%s", shorter than %d chars

:wrench: **configure it!**

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

```yaml
services:
-
class: Symplify\PHPStanRules\ObjectCalisthenics\Rules\NoShortNameRule
tags: [phpstan.rules.rule]
arguments:
minNameLength: 3
```
```php
function is()
{
}
```

:x:

<br>

```php
function isClass()
{
}
```

:+1:

<br>

## NoTestMocksRule

Mocking "%s" class is forbidden. Use direct/anonymous class instead for better static analysis
Expand Down
138 changes: 0 additions & 138 deletions src/ObjectCalisthenics/Rules/NoShortNameRule.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.

10 changes: 0 additions & 10 deletions tests/ObjectCalisthenics/Rules/NoShortNameRule/Fixture/SkipId.php

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit 9213f3c

Please sign in to comment.