Skip to content
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
12 changes: 0 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,18 +83,6 @@ Jump to: [Symfony-specific rules](#3-symfony-specific-rules), [Doctrine-specific

## Special rules

### MaximumIgnoredErrorCountRule

Tired of ever growing ignored error count in your `phpstan.neon`? Set hard limit to keep them low:

```yaml
parameters:
symplify:
maximumIgnoredErrorCount: 50
```

<br>

### NewOverSettersRule

If a class is always created with the same set of setters, pass the values via constructor instead. It makes the object state explicit, safer and easier to test:
Expand Down
2 changes: 0 additions & 2 deletions config/phpstan-extensions.neon
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ parameters:
symfonyReturnType: false
laravelReturnType: false
pathStrings: false
maximumIgnoredErrorCount: 0

# kept flat for backward compatibility, default to the %symplify.*% nested values
symfonyReturnType: %symplify.symfonyReturnType%
Expand All @@ -19,7 +18,6 @@ parametersSchema:
symfonyReturnType: bool()
laravelReturnType: bool()
pathStrings: bool()
maximumIgnoredErrorCount: int()
])

symfonyReturnType: bool()
Expand Down
16 changes: 0 additions & 16 deletions config/services/services.neon
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
parameters:
# related to MaximumIgnoredErrorCountRule
# kept flat for backward compatibility, defaults to %symplify.maximumIgnoredErrorCount%
maximumIgnoredErrorCount: %symplify.maximumIgnoredErrorCount%

parametersSchema:
# related to MaximumIgnoredErrorCountRule
maximumIgnoredErrorCount: int()

services:
- Symplify\PHPStanRules\NodeTraverser\SimpleCallableNodeTraverser
- Symplify\PHPStanRules\PhpDocParser\PhpDocNodeTraverser
Expand All @@ -28,10 +19,3 @@ services:

# symfony
- Symplify\PHPStanRules\Symfony\Reflection\ClassConstructorTypesResolver

# rules enabled by configuration
-
class: Symplify\PHPStanRules\Rules\MaximumIgnoredErrorCountRule
tags: [phpstan.rules.rule]
arguments:
limit: %maximumIgnoredErrorCount%
4 changes: 0 additions & 4 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ parameters:

level: 8

# custom configuration
maximumIgnoredErrorCount: 12

paths:
- src
- config
Expand Down Expand Up @@ -55,7 +52,6 @@ parameters:
path: tests/ErrorFormatter/SymplifyErrorFormatterTest.php

- '#Although PHPStan\\Node\\InClassNode is covered by backward compatibility promise, this instanceof assumption might break because (.*?) not guaranteed to always stay the same#'
- '#PHPStan\\DependencyInjection\\NeonAdapter#'

# not useful
- '#with generic class ReflectionAttribute (but )?does not specify its types#'
2 changes: 0 additions & 2 deletions src/Enum/RuleIdentifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ final class RuleIdentifier

public const string FORBIDDEN_NEW_INSTANCE = 'symplify.forbiddenNewInstance';

public const string MAXIMUM_IGNORED_ERROR_COUNT = 'symplify.maximumIgnoredErrorCount';

public const string STRING_FILE_ABSOLUTE_PATH_EXISTS = 'symplify.stringFileAbsolutePathExists';

public const string NO_JUST_PROPERTY_ASSIGN = 'symplify.noJustPropertyAssign';
Expand Down
71 changes: 0 additions & 71 deletions src/Rules/MaximumIgnoredErrorCountRule.php

This file was deleted.

17 changes: 0 additions & 17 deletions tests/Issues/InstantiateMaximumIgnoredErrorCountRuleTest.php

This file was deleted.

Loading