Reputation: 2106
The problem is that I would like to get a little comfortable while I am coding PHP in Netbeans.
When edit cursor is in the middle of the source of long metod
I would like to press a key shortcut to jump to the beginning of that method.
Eg:
public function doStuff($arg1,$arg2) <--- I want to jump here...
{
$a = $b;
$b = $c;
$c = $d;
$d = $e; <--- cursor is here
.....
}
Upvotes: 3
Views: 1563
Reputation: 346536
The best solution: don't write functions which are longer than one screen (and that's already pretty damn long).
Long functions with many local variables are very bad for maintainability: they're hard to understand and will contain disproportionally more bugs.
Instead, break them up into smaller functions that do only one thing and have a name that describes exactly what they do.
Upvotes: 0