Phpinspectionsea: "Variable is redundant" refactoring is wrong

Created on 13 Apr 2017  路  2Comments  路  Source: kalessil/phpinspectionsea

The refactoring works wrong because it will fail because of Parse error

Before refactoring

After refactoring
image

The right way to refator
image

http://sandbox.onlinephpfunctions.com/code/ab96f13ac1676851a0d88615dc54fabcea1a8006 how it works before refactoring
http://sandbox.onlinephpfunctions.com/code/6586bfbb31c134adb6a38f4803a97da2f5e55636 how it doesn't work after refactoring
http://sandbox.onlinephpfunctions.com/code/4f2afbd98798b8867f0950c329e2e736769f8bda how it does work after refactoring

It's easy to understand. I don't know what other info I should put here

bug / false-positive fixed

All 2 comments

That enough info here, thank you @vladyslavstartsev.

For myself: the same applies to the clone operations.

Fixed =)

Was this page helpful?
0 / 5 - 0 ratings