Skip to content

Commit

Permalink
Remove ExclusiveNamespaceRule, as requires lot of configuration and r…
Browse files Browse the repository at this point in the history
…ather architecture rule (#65)
  • Loading branch information
TomasVotruba authored Aug 7, 2023
1 parent ab93db5 commit f53f7d7
Show file tree
Hide file tree
Showing 11 changed files with 1 addition and 288 deletions.
46 changes: 1 addition & 45 deletions docs/rules_overview.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 77 Rules Overview
# 76 Rules Overview

## AnnotateRegexClassConstWithRegexLinkRule

Expand Down Expand Up @@ -316,50 +316,6 @@ class SomeCommand extends Command

<br>

## ExclusiveNamespaceRule

Exclusive namespace can only contain classes of specific type, nothing else

:wrench: **configure it!**

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

```yaml
services:
-
class: Symplify\PHPStanRules\Rules\ExclusiveNamespaceRule
tags: [phpstan.rules.rule]
arguments:
namespaceParts:
- Presenter
```
```php
namespace App\Presenter;

class SomeRepository
{
}
```

:x:

<br>

```php
namespace App\Presenter;

class SomePresenter
{
}
```

:+1:

<br>

## ExplicitClassPrefixSuffixRule

Interface have suffix of "Interface", trait have "Trait" suffix exclusively
Expand Down
1 change: 0 additions & 1 deletion phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<testsuite name="all">
<directory>tests</directory>
<directory>packages-tests</directory>
<exclude>tests/Rules/ExclusiveNamespaceRule/Fixture</exclude>
<exclude>tests/Rules/NoConstructorInTestRule/Fixture</exclude>
<exclude>tests/Rules/PreventDuplicateClassMethodRule/Fixture</exclude>
<exclude>tests/Rules/ForbiddenArrayWithStringKeysRule/Fixture</exclude>
Expand Down
120 changes: 0 additions & 120 deletions src/Rules/ExclusiveNamespaceRule.php

This file was deleted.

52 changes: 0 additions & 52 deletions tests/Rules/ExclusiveNamespaceRule/ExclusiveNamespaceRuleTest.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/Rules/ExclusiveNamespaceRule/Fixture/SkipNotMatched.php

This file was deleted.

10 changes: 0 additions & 10 deletions tests/Rules/ExclusiveNamespaceRule/config/configured_rule.neon

This file was deleted.

0 comments on commit f53f7d7

Please sign in to comment.