Skip to content
Permalink
Browse files

Add documentation for automatically removing UnusedVariable

  • Loading branch information...
muglug committed Aug 9, 2019
1 parent 5b2f54b commit 85c9b6bb442039c773120059ae35a31f8ef9d488
Showing with 25 additions and 0 deletions.
  1. +25 −0 docs/manipulating_code/fixing.md
@@ -426,3 +426,28 @@ class A {
new A();
```

### UnusedVariable

This removes unused variables.

Running `vendor/bin/psalter --issues=UnusedVariable` on

```php
function foo() : void {
$a = 5;
$b = 6;
$c = $d = $a + $b;
echo "foo";
}
```

gives

```php
function foo() : void {
$a = 5;
$b = 6;
echo "foo";
}
```

0 comments on commit 85c9b6b

Please sign in to comment.
You can’t perform that action at this time.