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 270114 - Order of getters and setters
Summary: Order of getters and setters
Status: NEW
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.2
Hardware: All All
: P3 normal (vote)
Assignee: issues@php
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-18 11:35 UTC by lolka_bolka
Modified: 2017-09-15 14:16 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description lolka_bolka 2017-03-18 11:35:33 UTC
This is a feature request, did not found where should I post it.

Generating getters and setters are great feature. I'd like an option, checkbox, where I can set the following when I want to insert getters and setters too: Join (clamp, whatever) functions.

I mean, first the getter, and then the setter, for next field the getter and then the setter, etc..

For example:

private $myField;

private $otherField;

when generating getter and setter and this option checked:

public function getMyField() {...}

public function setMyField($myField) {...}

public function getOtherField() {...}

public function setOtherField($otherField) {...}
Comment 1 Stawi 2017-03-20 00:51:18 UTC
I think in "Generate getters and setters" window it should be new combo box named ie. "order of methods" with three options:
- getter/setter in pairs
- first getters, then setters
- first setters, then getters

Now it works in second way, but many people, including me, prefer first option..
Comment 2 Dusan Balek 2017-09-15 14:16:08 UTC
There is the option 'Keep Getters And Setters Together' in Java. Reassigning to PHP.