Why can't refactor extract method "switch case" statement begins with the comment

Answered

I have sample code:

```php

<?php

$test = 'case';

switch ($test) {
case 'foo':
// comment
echo 'foofoo';
break;
case 'bar':
echo 'barbar';
break;
}

```

I want to refactor the "switch case" extract method statement

I can extract method case 'bar' to function 'barbar', but I can not extract method case 'foo' because that has comments of begin.


 

env:
PhpStorm 2018.3.4

0
1 comment

That's a bug. Reported: https://youtrack.jetbrains.com/issue/WI-45428 - feel free to vote for or comment it in order to get notified about its updates.

0

Please sign in to leave a comment.