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 redundant NoEmptyRule #525

Merged
merged 1 commit into from
May 1, 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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ For a full diff see [`1.0.0...main`][1.0.0...main].
- Dropped support for PHP 7.3 ([#498]), by [@localheinz]
- Dropped support for PHP 7.4 ([#499]), by [@localheinz]

### Removed

- Removed `Expressions\NoEmptyRule` ([#525]), by [@enumag]

## [`1.0.0`][1.0.0]

For a full diff see [`0.15.3...1.0.0`][0.15.3...1.0.0].
Expand Down Expand Up @@ -456,7 +460,9 @@ For a full diff see [`362c7ea...0.1.0`][362c7ea...0.1.0].
[#496]: https://github.com/ergebnis/phpstan-rules/pull/496
[#498]: https://github.com/ergebnis/phpstan-rules/pull/498
[#499]: https://github.com/ergebnis/phpstan-rules/pull/498
[#525]: https://github.com/ergebnis/phpstan-rules/pull/525

[@enumag]: https://github.com/enumag
[@ergebnis]: https://github.com/ergebnis
[@Great-Antique]: https://github.com/Great-Antique
[@localheinz]: https://github.com/localheinz
Expand Down
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ This package provides the following rules for use with [`phpstan/phpstan`](https
- [`Ergebnis\PHPStan\Rules\Closures\NoParameterWithNullableTypeDeclarationRule`](https://github.com/ergebnis/phpstan-rules#closuresnoparameterwithnullabletypedeclarationrule)
- [`Ergebnis\PHPStan\Rules\Closures\NoParameterWithNullDefaultValueRule`](https://github.com/ergebnis/phpstan-rules#closuresnoparameterwithnulldefaultvaluerule)
- [`Ergebnis\PHPStan\Rules\Expressions\NoCompactRule`](https://github.com/ergebnis/phpstan-rules#expressionsnocompactrule)
- [`Ergebnis\PHPStan\Rules\Expressions\NoEmptyRule`](https://github.com/ergebnis/phpstan-rules#expressionsnoemptyrule)
- [`Ergebnis\PHPStan\Rules\Expressions\NoErrorSuppressionRule`](https://github.com/ergebnis/phpstan-rules#expressionsnoerrorsuppressionrule)
- [`Ergebnis\PHPStan\Rules\Expressions\NoEvalRule`](https://github.com/ergebnis/phpstan-rules#expressionsnoevalrule)
- [`Ergebnis\PHPStan\Rules\Expressions\NoIssetRule`](https://github.com/ergebnis/phpstan-rules#expressionsnoissetrule)
Expand Down Expand Up @@ -148,10 +147,6 @@ This rule reports an error when a closure has a parameter with `null` as default

This rule reports an error when the function [`compact()`](https://www.php.net/compact) is used.

#### `Expressions\NoEmptyRule`

This rule reports an error when the language construct [`empty()`](https://www.php.net/empty) is used.

#### `Expressions\NoEvalRule`

This rule reports an error when the language construct [`eval()`](https://www.php.net/eval) is used.
Expand Down
5 changes: 0 additions & 5 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,6 @@
<code>Rule</code>
</MissingTemplateParam>
</file>
<file src="src/Expressions/NoEmptyRule.php">
<MissingTemplateParam>
<code>Rule</code>
</MissingTemplateParam>
</file>
<file src="src/Expressions/NoErrorSuppressionRule.php">
<MissingTemplateParam>
<code>Rule</code>
Expand Down
1 change: 0 additions & 1 deletion rules.neon
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ rules:
- Ergebnis\PHPStan\Rules\Closures\NoNullableReturnTypeDeclarationRule
- Ergebnis\PHPStan\Rules\Closures\NoParameterWithNullableTypeDeclarationRule
- Ergebnis\PHPStan\Rules\Expressions\NoCompactRule
- Ergebnis\PHPStan\Rules\Expressions\NoEmptyRule
- Ergebnis\PHPStan\Rules\Expressions\NoErrorSuppressionRule
- Ergebnis\PHPStan\Rules\Expressions\NoEvalRule
- Ergebnis\PHPStan\Rules\Expressions\NoIssetRule
Expand Down
35 changes: 0 additions & 35 deletions src/Expressions/NoEmptyRule.php

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Ergebnis\PHPStan\Rules\Test\Fixture\Expressions\NoEmptyRule\Success;
namespace Ergebnis\PHPStan\Rules\Test\Fixture\Expressions\NoCompactRule\Success;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ha, good catch!


function _compact(string ...$names): array
{
Expand Down

This file was deleted.

This file was deleted.

14 changes: 0 additions & 14 deletions test/Fixture/Expressions/NoEmptyRule/Success/empty-not-used.php

This file was deleted.

71 changes: 0 additions & 71 deletions test/Integration/Expressions/NoEmptyRuleTest.php

This file was deleted.