Details
-
Type:
Task
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: 2.0
-
Component/s: None
-
Security Level: All
-
Labels:None
Description
The reasoning is simple: The prefix "_" is usually either used for easier distinction of instance variables from other, i.e. local variables, instead of always using "this." (often seen in C#), or it is used to signal that a member is not meant to be accessed from outside of the class when the language does not have visibility modifiers (PHP4).
Since you always have to use "$this->" in PHP5+ when accessing instance members and there are visibility modifiers, the "_" is largely superfluous and just makes the verbose OO code even more verbose.
Maybe the following find/replace steps will do the job almost completely:
"private $_" => "private $" "protected $_" => "protected $" "$this->_" => "$this->"
Activity
Benjamin Eberlei
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Workflow | jira [ 11261 ] | jira-feedback [ 13848 ] |
Benjamin Eberlei
made changes -
| Workflow | jira-feedback [ 13848 ] | jira-feedback2 [ 15712 ] |
Benjamin Eberlei
made changes -
| Workflow | jira-feedback2 [ 15712 ] | jira-feedback3 [ 17969 ] |
This list may be incomplete, as errors occurred whilst retrieving source from linked applications:
- Request to http://www.doctrine-project.org/fisheye/ failed: Error in remote call to 'FishEye 0 (http://www.doctrine-project.org/fisheye/)' (http://www.doctrine-project.org/fisheye) [AbstractRestCommand{path='/rest-service-fe/search-v1/crossRepositoryQuery', params={query=DDC-536, expand=changesets[-21:-1].revisions[0:29],reviews}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)
i just found a possible BC issue with this.
EntityRepository is allowed to be extended by us, it has several variables that are underscore prefixed. How to proceed in this case?