This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 169690 - Surround with - for ->get and ->set methods
Summary: Surround with - for ->get and ->set methods
Status: NEW
Alias: None
Product: php
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: issues@php
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-02 14:46 UTC by danilchenko_anton
Modified: 2010-09-17 05:31 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description danilchenko_anton 2009-08-02 14:46:40 UTC
Function "Surround with" wery usable for me.
I propose improve it: for "->get" insert "$var_name = " before; for "->set" method not insert anywhere.

Example code:
$controllerObj->setLayout();  // not show "Surround with" (see on "set" prefix)
$controllerObj->getLayout();  // show "Surround with" (see on "get" prefix) or automatically insert variable before
Comment 1 Filip Zamboj 2009-09-10 14:32:23 UTC
you probably mean assign variable hint that is already implemented already. Not remember in what release was this
introduced. Anyway, I'm sure it's in 6.8 development build, available on http://bertram.netbeans.org/hudson/job/PHP-build/, 

What about not offering "assign variable" on functions starting with set, this should be a subject of discussion. You're
right that it shouldn't be a function that returns something but well ... it still can return boolean function at least,
so you know if set is true or false. => reassigning to responsible developer. 
Comment 2 rmatous 2009-09-14 09:46:21 UTC
assign variable hint was implemented for 6.7 as a line warning (no selection needed). Just put cursor on the line like
this for example ("|" means cursor):
$controllerObj->get|Layout();

This approach I found sufficient for most of usecases and probably also faster for use, on the other hand there could be
also variant based on selection. 
Comment 3 Filip Zamboj 2010-09-15 12:29:33 UTC
batch reassigning