You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've posted a gif of this issue below, but basically, in certain situations (especially in highly complex or nested functions), method extraction will 'paste' the method outside of the wrong set of brackets, such that it is still inside the original method. An example of this would be:
public function method() {
if(8 == 8) {
for($i = 0; $i < 10; $i++) {
$this->test($i);
}
}
/**
* @param $i
*/
public function test($i) {
$i++;
$i--;
}
}
As you can see, the new function is still inside the original method brackets. It probably wouldn't happen with a function this small, but that's the idea. I have noticed this quite a few times when I've been working on more complex classes, and it is a bit annoying. See the gif below for a real example of this bug happening.
Originally posted by @agleis:
I've posted a gif of this issue below, but basically, in certain situations (especially in highly complex or nested functions), method extraction will 'paste' the method outside of the wrong set of brackets, such that it is still inside the original method. An example of this would be:
Extracting the
$i++
and$i--
lines would produce:As you can see, the new function is still inside the original method brackets. It probably wouldn't happen with a function this small, but that's the idea. I have noticed this quite a few times when I've been working on more complex classes, and it is a bit annoying. See the gif below for a real example of this bug happening.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: